# data[].attributes.body
#include <iostream>
using namespace std;
int main()
{
int n;
cout<<"nhap so n";
cin>>n;
for (int i=1;i<=n;i++)
{
for (int j=1;j<=2*n-1;j++)
{
if(i==n||j==i+n-1||j==n-i+1)
{cout <<"*";}
else
{cout<<" ";}
}
cout <<"\n";
}
return 0;
}

# data[].attributes.attachment_link.readable_text
#include <iostream>
using namespace std;
int main(){
	int x,a;
	cout<<"nhap so can doi :";
	cin>>x;
	int s=0,q=1;
	while(x!=0){
		a=x%2;
		x=x/2;
		s=s+a*q;
		q=q*10;
	}
	cout<<"so dang nhi phan cua x:"<<s;
}

# data[].attributes.attachment_link.readable_text
#include <bits/stdc++.h>
using namespace std;
int n;
int main()
{
	cin>>n;
	do { int i=n%2;
 	n=n/2;
 	cout<<i<<" ";}
	while (n!=0);
return 0;
}


# data[].attributes.body
#include <iostream>

using namespace std;

int main()
{
int n,i;
cout<<"nhap so n\n";
cin>>n;
do{
int i=n%2;
n/=2;
cout<<i<<"\t";
}
while (n!=0);
return 0;
}

# data[].attributes.attachment_link.readable_text
#include<bits/stdc++.h>
using namespace std;
int n;
int main()
{
	cin >> n; 
	if ( n>8 || n<=1) cout << "khong the thuc hien"; 
	switch(n){
		case 2:cout<<"thu hai"; break;
		case 3:cout<<"thu ba"; break;
		case 4:cout<<"thu tu"; break;
		case 5:cout<<"thu nam"; break;
		case 6:cout<<"thu sau"; break;
		case 7:cout<<"thu bay"; break;
		case 8:cout<<"chu nhat"; break;
	}
	return 0;
}
    

# data[].attributes.attachment_link.readable_text
#include<bits/stdc++.h>
using namespace std;
int a,b,c;
int main()
{
	cin >> a >> b >> c;
	if (a<=0 || b<=0 || c<=0 || a+c<b || a+b<c || b+c<a)  
	cout << "abc khong the tao thanh tam giac";
	else if ( a==b && a==c) cout << "abc tao thanh tam giac deu ";
		 if ( a==b || b==c || c==a) cout <<"abc tao thanh tam gia can";
		 if ( a*a==b*b + c*c || c*c==a*a+b*b || b*b==a*a+c*c) cout <<" abc tao thanh tam giac vuong";
return 0;	
}
    

# data[].attributes.attachment_link.readable_text
#include<bits/stdc++.h>
using namespace std;
int n;
int main()
{
	cin >> n;
	while ( n!=0) {
		cin >> n;
	} 
	return 0;
}

# data[].attributes.attachment_link.readable_text
#include<bits/stdc++.h>
using namespace std;
int n,s;
int main()
{
	cin >> n; 
	int s=1;
	for ( int i=1; i<=n; i++)
		s=s*i;
	cout << "gia thua cua n la: "<< s ;
	return 0;
}

# data[].attributes.attachment_link.readable_text
#include <bits/stdc++.h>
using namespace std;
int main()
{
	int a,b,c;
    cin>>a>>b>>c;
    if(a+b>c && a+c>b && b+c>a){
        if(a==b && b==c){
            cout<<"tam giac deu";
        }
        else{
            if(a==b || b==c || a==c){
                 if (a*a==b*b+c*c||b*b==a*a+c*c||c*c==a*a+b*b){cout<<"tam giac vuong can";
                 }else{cout<<"tam giac can";}
            }else if(a*a==b*b+c*c||b*b==a*a+c*c||c*c==a*a+b*b){cout<<"tam giac vuong";}
            else{cout<<"tam giac thuong";}
        }

    }else{cout<<"khong phai do dai 3 canh tam giac";}
}


# data[].attributes.attachment_link.readable_text
#include <bits/stdc++.h>
using namespace std;
int main()
{
	int a;
	cin>>a;
	if (a<2||a>8){cout<<"khong phai la so qui uoc";}
	switch(a){
	case 2:cout<<"Thu hai"; break;
	case 3:cout<<"Thu ba"; break;
	case 4:cout<<"Thu tu"; break;
	case 5:cout<<"Thu nam"; break;
	case 6:cout<<"Thu sau"; break;
	case 7:cout<<"Thu bay"; break;
	case 8:cout<<"Chu nhat"; break;
	}
}


# data[].attributes.attachment_link.readable_text

#include <iostream>
using namespace std;
int main(){
	int n;
	cout<<"nhap so tu nhien n:";
	cin>>n;
	for (int i=1; i<=n; i++){
		for(int j=1; j<=n-i;j++){
			cout<<" ";
		}
		for(int k=1; k<=2*i-1;k++){
			cout<<"*";
		}
		cout<<endl;
	}
	
}
    

# data[].attributes.body
#include <iostream>
using namespace std;
int main()
{   unsigned long n,s=1;
cout<<"nhap so  n\n ";
cin >>n;
for (int i=1;i<=n;i++)
{
s=s*i;
}
cout <<s;
return 0;
}

# data[].attributes.body
#include <iostream>
using namespace std;
int main()
{ double a,b,c;
cout<<"nhap do dai canh a\n"<<"nhap do dai canh b\n"<<"nhap do dai canh c\n";
cin>>a>>b>>c;
if ((a>b+c) || (c>a+b) || (b>a+c))
{cout<<"day khong phai la do dai cua 1 tam giac";}
else
{cout<<"ba canh tren thuoc 1 tam giac";}
if (a==b || c==b ||a==c)
{ if (a*a==b*b+c*c || c*c==a*a+b*b || b*b==a*a + c*c)
cout<<"day la 1 tam giac vuong can";
else
cout<<"day la tam giac can";
}
else
{
if (a*a==b*b+c*c ||b*b==c*c+a*a || c*c==a*a+c*c)
cout<<"day la tam giac vuong";
else (a==c && a==b);
cout<<"day la tam giac deu";
}

return 0;
}

# data[].attributes.attachment_link.readable_text
#include <bits/stdc++.h>
using namespace std;
int main()
{int n,j;
cin>>n;
do 
{int i=n%2;
 n=n/2;
 cout<<i<<" ";
}
while (n!=0);
return 0;
}

# data[].attributes.body
#include <bits/stdc++.h>
using namespace std;
int main(){
int a;
cin>>a;
while(a!=0){
cout<<a%2;
a/=2;
}
}

# data[].attributes.attachment_link.readable_text
#include <bits\stdc++.h>
using namespace std;
int main(){
	int n;
	cout<<"nhap vao so n";cin>>n;
	while (n!=0){
		cout<<n%2;n=n/2;
	
}
return 0;
}

# data[].attributes.body
#include <iostream>
using namespace std;

int main() {
int n;
do {
cout << "nhap so:";
cin >> n;
}while (n!=0);
}

# data[].attributes.body
#include <iostream>
using namespace std;
int main(){
int a;
do {
cout<<"nhap mot so:";
cin>>a;
}
while(a!=0);
}

# data[].attributes.body
#include <iostream>
using namespace std;

int main() {
int n;
long long s=1;
cin >> n;
for (int i=1;i<=n;i++){
s=s*i;
}
cout << "tong giai thua= " << s;
}

# data[].attributes.body
#include <bits/stdc++.h>
using namespace std;
int main(){
int temp=1;
for(int i=1;i<1000;i++){int dem=0;
for(int j=1;j<=i/2;j++){
if(i%j==0){
dem++;
}
}
if((dem==1)&&(i==temp+2)){cout<<temp<<" "<<i<<endl;

}
if(dem==1){temp=i;
}
}
}

# data[].attributes.attachment_link.readable_text
#include <bits\stdc++.h>
using namespace std;
int main(){
	int n;
	do{
	    cin >>n;
	}
	while (n!=0);
	return 0;
}

# data[].attributes.attachment_link.readable_text
#include <bits\stdc++.h>
using namespace std;
int main()
{
	int n;
	cout<<"nhap so:";cin>>n;
	if (n>8||n<=1){cout<<"khong phai so qui uoc";}
	switch(n)
	{
	case 2:{cout<<"Thu hai";break;}
	case 3:{cout<<"Thu ba";break;}
	case 4:{cout<<"Thu tu";break;}
	case 5:{cout<<"Thu nam";break;}
	case 6:{cout<<"Thu sau";break;}
	case 7:{cout<<"Thu bay";break;}
	case 8:{cout<<"Chu nhat";break;}
	}
	return 0;
}

# data[].attributes.attachment_link.readable_text
#include <iostream>
using namespace std;
int main()
{
	cout <<"nhap a,b,c "<<endl;
	int a,b,c;
	cin >>a>>b>>c;
	if (a+b>c&&a+c>b&&b+c>a)
	 {
	 cout <<"day la 3 canh cua tam giac "<<endl;
	 if (a==b||b==c||a==c) 
	 	{
			 if (a*a==b*b+c*c||b*b==a*a+c*c||c*c==a*a+b*b) {cout<<"tam giac vuong can  "; }
	 		 else {cout<<"tam giac can ";}
	 	}
	 else 
	 	{
	 		if (a*a==b*b+c*c||b*b==a*a+c*c||c*c==a*a+b*b) {cout<<"tam giac vuong  "; }
	 		else
			 { 
	             if (a==b&&b==c) {cout <<"tam giac deu ";}
	             else {cout <<"tam giac thuong ";}
	         }
	    }
     }	
     else {cout <<"ko la tam giac ";}
}

# data[].attributes.attachment_link.readable_text
#include<bits/stdc++.h>
using namespace std;
int main() {
  float a,b,c;
  cout << "nhap canh a: ";cin >> a;
  cout << "nhap canh b: ";cin >> b;
  cout << "nhap canh c: ";cin >> c;
  if (a <= 0 || b <= 0 || c <= 0) cout << "canh phai lon hon 0";
  else {
    if (a + b < c || a + c < b || b + c < a) cout << "khong phai 3 canh cua tam giac";
    else {
      if (a==b,b==c) cout << "Tam giac deu";
      else {
        if (a == b || b == c || c == a) cout << "Tam giac can";
        else {
          if (a * a + b * b == c * c || a * c + c * c == b * b || b * b + c * c == a * a) {
            cout << "Tam giac vuong";
          } else cout << "Tam giac thuong";
        }
      }
    }
  }
  return 0;
}

# data[].attributes.body
#include <iostream>
using namespace std;
int main(){
int n;
cout<<"Nhap vao mot so:";
cin>>n;
if (n>8 || n<=1){cout<<"khong phai la so qui uoc";}
switch(n){
case 2:cout<<"Thu hai";break;
case 3:cout<<"Thu ba";break;
case 4:cout<<"Thu tu";break;
case 5:cout<<"Thu nam";break;
case 6:cout<<"Thu sau";break;
case 7:cout<<"Thu bay";break;
case 8:cout<<"Chu nhat";break;
}
}

# data[].attributes.body
#include <iostream>
#include <math.h>
using namespace std;
int main(){
int a,b,c;
cout<<"nhap do dai ba canh cua tam giac:";
cin>>a>>b>>c;
if(a>=b+c or b>=a+c or c>=a+b){
cout<<"day khong phai la tam giac";
}
else if(pow(a,2)==pow(b,2)+pow(c,2) or pow(b,2)==pow(a,2)+pow(c,2) or pow(c,2)==pow(b,2)+pow(a,2)){
cout<<"day la tam vuong";
}
else if(a==b or a==c or b==c){
cout<<"day la tam giac can";
}
else if(pow(a,2)==pow(b,2)+pow(c,2) and b==c or pow(b,2)==pow(a,2)+pow(c,2) and a==c or pow(c,2)==pow(b,2)+pow(a,2) and a==b){
cout<<"day la tam giac vuong can";
}
else{
cout<<"day la tam giac binh thuong";
}
}

# data[].attributes.body
#include <iostream>
using namespace std;
int main(){
int n,s=1;
cout<<"Nhap so n:";
cin>>n;
for (int i=1;i<=n;i++){
s=s*i;
}
cout<<s;
}

# data[].attributes.body
#include <bits/stdc++.h>
using namespace std;
int main(){
int a;
cin>>a;
int b=(2*a)-1;
int dem=(b-1)/2;
int dem1=0;
for(int i=1;i<a;i++){
for(int j=1;j<=dem;j++){
cout<<" ";
}
if(dem1==0){
cout<<"*"<<endl;
}else{cout<<"*";
for(int g=1;g<dem1;g++){
cout<<" ";
}
cout<<"*"<<endl;
}
dem1+=2;
dem--;
}
for(int k=1;k<=b;k++){
cout<<"*";
}
}

# data[].attributes.body
#include <iostream>
using namespace std;
int main()
{
int a;
do{

cout<<"nhap so a\n";
cin>>a;

}
while(a!=0);
return 0;
}

# data[].attributes.attachment_link.readable_text
#include <iostream>
using namespace std;
int main()
{
	int n;
	do 
	{
		cin >>n;
	}
	while (n!=0);
	return 0;
}

# data[].attributes.body
#include <iostream>
using namespace std;
int main(){
int x;
do{
cin>>x;
}while(x!=0);

}

# data[].attributes.body
#include <iostream>
#include <cmath>
using namespace std;
int main(){
float a,b,c;
cout<<"Nhap ba so a,b,c:";
cin>>a>>b>>c;
if(a>=b+c||b>=a+c||c>=a+b){cout<<"ba so tren khong the la do dai ba canh cua tam giac";}
else {cout<<"ba so tren co the la ba canh cua tam giac"<<'\n';
if (a*a==b*b+c*c||b*b==a*a+c*c||c*c==a*a+b*b){
if(a==b||b==c||a==c){cout<<"Day la tam gia vuong can";}
else {cout<<"Day la tam giac vuong";}
}
else {
if(a==b && b==c){cout<<"Day la tam giac deu";}
else {
if (a==b||b==c||a==c){cout<<"Day la tam giac can";}}
}
}

}

# data[].attributes.attachment_link.readable_text
#include <iostream>
using namespace std;
int main()
{
	int n;
	cin>>n;
	switch(n)
	{
	case 2:{cout<<"thu hai";break;}
	case 3:{cout<<"thu ba";break;}
	case 4:{cout<<"thu tu";break;}
	case 5:{cout<<"thu nam";break;}
	case 6:{cout<<"thu sau";break;}
	case 7:{cout<<"thu bay";break;}
	case 8:{cout<<"chu nhat";break;}
    default :cout<<n<<" khong phai so qui uoc";
	}
	return 0;
}

# data[].attributes.body
#include <iostream>
using namespace std;
int main ()
{

int a;
cout<<"nhap mot so\n";
cin>>a;
if ((a<=1) ||(a>8))
{
cout<<"a khong phai la so quy uoc";
}
else{
switch (a){

{
case 2 :cout<<"thu hai";break;
}
{

case 3 :cout<<"thu ba";break;
}
{

case 4 :cout<<"thu tu";break;
}
{

case 5 :cout<<"thu nam";break;
}
{

case 6 :cout<<"thu sau";break;
}
{

case 7 :cout<<"thu bay";break;
}
{

case 8 :cout<<"chu nhat";break;
}

return 0;
}
}

}

# data[].attributes.body
#include <iostream>
using namespace std;
int main(){
int n;
cout<<"nhap  1 so n :";
cin>>n;
int S=1;
for(int i=1;i<=n;i++){
S=S*i;
}
cout<<S;
}

# data[].attributes.body
#include <iostream>
using namespace std;
int main(){
int x;
cout<<"nhap 1 so :";
cin>>x;
if(x>8){
cout<<"khong phai la so qui uoc";
}
else if(x<=1){
cout<<"khong phai la so qui uoc";
}
else{
switch(x){
case 2: {cout<<"thu hai";
break;
}
case 3:{cout<<"thu ba";
break;
}
case 4:{cout<<"thu tu";
break;
}
case 5:{cout<<"thu nam";
break;
}
case 6:{cout<<"thu sau";
break;
}
case 7:{cout<<"thu bay";
break;
}
case 8:{cout<<"chu nhat";
break;
}
}

}

}

# data[].attributes.attachment_link.readable_text
#include <iostream>
using namespace std;
int main()
{
	cout <<"nhap so ";
	int n;
	cin>>n;
	if ((n<=1) || (n>8)) {cout <<"ko phai so qui uoc";}
	else
	{
	switch(n)
	{
		case 2:{cout <<"thu hai";break;}
		case 3:{cout <<"thu ba ";break;}
		case 4:{cout <<"thu tu ";break;}
		case 5:{cout <<"thu nam ";break;}
		case 6:{cout <<"thu sau ";break;}
		case 7:{cout <<"thu bay ";break;}
		case 8:{cout <<"chu nhat ";break;}
	
	}
    }
	return 0;
}

# data[].attributes.attachment_link.readable_text
#include <iostream>
#include<cmath>
using namespace std;
int main()
{int n,s=1,i=1;
cin>>n;
do 
{
	s=s*i;
	i++;	
}
while (i<=n);
cout<<s;
return 0;

}

# data[].attributes.body
#include <bits/stdc++.h>
using namespace std;
int main(){
int a;
cin>>a;
long b=1;
for(int i=1;i<=a;i++){
b*=i;
}
cout<<b;
}

# data[].attributes.body
#include <bits/stdc++.h>
using namespace std;
int main(){
float a;
do{
cin>>a;
}while(a!=0);
}

# data[].attributes.attachment_link.readable_text
#include <iostream>
using namespace std;
int main()
{
	cout<<"nhap n ";
	int n,s=1;
	cin >>n;
	for (int i=1;i<=n;i++)
		{
			s=s*i;
		}
	cout <<s;
	return 0;
}

# data[].attributes.attachment_link.readable_text
#include <bits/stdc++.h>
using namespace std;
int main(){
	int n;
	cout<<"nhap vao so n";cin>>n;
	long giaithua = 1;
	for (int i=1;i<=n;i++){
		giaithua = giaithua*i;
		
	}
	cout<<"giai thua cua "<<n<<" la "<<giaithua<<'\n';
	return 0;
}

# data[].attributes.attachment_link.readable_text
#include <iostream>
using namespace std;
int main()
{int n;
	do 
	{cin>>n;
	}
	while (n>0);
return 0;
}

# data[].attributes.body
#include <iostream>
using namespace std;
int main()
{
cout<<"nhap n\n ";
int n,s=1;
cin >>n;
for (int i=1;i<=n;i++)
{
s=s*i;
}
cout<<s;
return 0;
}