#include<stdio.h>
int main()
{
int a,b;
while( (scanf("%d %d",&a,&b) !=EOF))
printf("%d\n",a+b);
return 0;
}
#include <stdio.h>
int main()
{
int n,m;
scanf("%d",&n);
int t=1;
int sum=0;
while(n>0)
{
m=n%10;
n/=10;
if(m%2==0)
sum+=m;
}
printf("%d",sum);
return 0;
}
#include<stdio.h>
int main()
{
int n,k,m,a;
scanf("%d %d %d",&n,&m,&k);
while(n<m)
{
n+=k;
a++;
}
printf("%d",a);
return 0;
}
#include<stdio.h>
int main()
{
int n,i=0;
scanf("%d",&n);
while(n>0)
{
n/=10;
i++;
}
printf("%d",i);
return 0;
}
#include <stdio.h>
int main()
{
int n,sum=0,i=0;
scanf("%d",&n);
while(i<=n)
{
sum+=i;
i++;
}
printf("%d",sum);
return 0;
}
#include<stdio.h>
int main()
{
int sum=0;
int n=0;
scanf("%d",&n);
int N;N=n*n*n;
int a;
while(N>0)
{
a=N%10;
sum+=a*a*a;
N/=10;
}
printf("%d",sum);
return 0;
}
#include <stdio.h>
int main()
{
int n,m;
int sum=0;
int a=0;
scanf("%d %d",&n,&m);
while(n>0)
{
a=n%10;
if(a==m)
{sum+=1;}
n/=10;
}
printf("%d",sum);
return 0;
}
#include<stdio.h>
int main()
{
int a,b;
while((scanf("%d %d",&a,&b) !=EOF))
printf("%d\n",a+b);
return 0;
}
#include <stdio.h>
int main()
{
int a,b=0;
while((scanf("%d %d",&a,&b) !=EOF)&&(a!=0)||(b!=0))
printf("%d\n",a+b);
return 0;
}
#include<stdio.h>
int main()
{
int a,b;
while((scanf("%d %d",&a,&b) !=EOF))
printf("%d\n\n",a+b);
return 0;
}
#include<stdio.h>
int main()
{
int n,i=0;
scanf("%d",&n);
while(n!=1)
{
if(n%2==0)
n/=2;
else
n=3*n+1;
i++;
}
printf("%d\n",i);
return 0;
}
#include<stdio.h>
int main()
{
float n, average, sum = 0;
int i = 0;
while (scanf("%f", &n) != EOF)
{
sum += n;
i++;
}
average = sum / i;
printf("%.2f\n", average);
return 0;
}
#include<stdio.h>
int main()
{
int n;
float a, sum = 0;
scanf("%d", &n);
while (n--)
{
scanf("%f", &a);
sum += a;
}
printf("%.2f", sum);
return 0;
}
#include<stdio.h>
int main()
{
int n, i = 0;
while ((scanf("%d ", &n))!= EOF)
{
if ((n % 4) == 0 || (n % 7) == 0)
i++;
}
printf("%d", i);
return 0;
}
?
?
#include<stdio.h>
int main()
{
int x,y,z;
int i=0;
scanf("%d %d %d",&x,&y,&z);
do{i++;}
while(!(i%3==x&&i%5==y&&i%7==z));
printf("%d",i);
return 0;
}
#include<stdio.h>
#include<math.h>
int gcd(long a, long b)
{
if (b == 0)
return a;
else
return gcd(b, a % b);
}//辗转相除法求最大公约数
int main()
{
int n;
long a, b, c, d;
long t;
scanf("%d", &n);
scanf("%ld/%ld", &a, &b);
t = gcd(a, b);
a /= t;
b /= t;
while (n--)
{
scanf("%ld/%ld", &c, &d);
a = a * d + c * b;
b = b * d;
t = gcd(a, b);
a /= t;
b /= t;
}
if (a % b == 0)
printf("%ld", a / b);
else if (a / b == 0 && a != 0)
printf("%ld/%ld", a, b);
else
printf("%ld %ld/%ld", a / b, a % b, b);
return 0;
}
#include<stdio.h>
int main()
{
int a,b;
int t,count=1;
scanf("%d",&a);
if(a<0)
{
printf("fu ");
a=-a;
}
t=a;
while(t>9)
{
t/=10;
count*=10;
}
do
{
b=a/count;
switch(b)
{
case 0:printf("ling");break;
case 1:printf("yi");break;
case 2:printf("er");break;
case 3:printf("san");break;
case 4:printf("si");break;
case 5:printf("wu");break;
case 6:printf("liu");break;
case 7:printf("qi");break;
case 8:printf("ba");break;
case 9:printf("jiu");break;
}
if(count>9)//判断点,控制最后输出没有空格
printf(" ");
a%=count;
count/=10;
}
while(count>0);
printf("\n");
return 0;
}
#include<stdio.h>
int main()
{
int M,N,gongyue,gongbei;
scanf("%d %d",&M,&N);
int min,i=0;
if(M>N)
min=N;
else
min=M;
while(i<=min)
{
i++;
if(M%i==0&&N%i==0)
gongyue=i;
}
gongbei=(M*N)/gongyue;
printf("%d %d\n",gongyue,gongbei);
return 0;
}
#include<stdio.h>
int main()
{
int a,sum=0;
while(a>0)
{
scanf("%d",&a);
if(a%2!=0)
sum+=a;
}
printf("%d",sum);
return 0;
}
#include <stdio.h>
int main()
{
int m, n;
int i;
int x;
scanf("%d %d", &m, &n);
for(i=1;i<=n;i++)
{
scanf("%d", &x);
if (x <= 0)
{
printf("Game Over");
return 0;
}
else if (x < m)
{
printf("Too small\n");
}
else if (x > m)
{
printf("Too big\n");
}
else if (i == 1&&x==m)
{
printf("Bingo!");
return 0;
}
else if (i != 1 && i <= 3&&x==m)
{
printf("Lucky You!");
return 0;
}
else if (i > 3&&x==m)
{
printf("Good Guess!");
return 0;
}
else if (x != m && i == n)
{
printf("Game Over");
return 0;
}
}
printf("Game Over");
return 0;
}