视频学习
#include<stdio.h>
int main()
{
int A,B,C;
for (A='X';A<='Z';A++)
{
for (B='X';B<='Z';B++)
{
for (C='X';C<='Z';C++)
{
if(A=='X'||C=='X'||C=='Z'||B==A||B==C||A==C)
{
continue;
}
printf("A-%c\nB-%c\nC-%c",A,B,C);
}
}
}
}
#include <stdio.h>
int fab(int a)
{
if(a == 1 || a == 2)
return 1;
else
return fab(a-1) + fab(a-2);
}
int main()
{
int n;
scanf("%d" , &n);
printf("%d", fab(n));
return 0;
}
#include <stdio.h>
#include <stdlib.h>
int main()
{
int n,a,b,c;
double average;
scanf("%d",&n);
while(n--)
{
int count = 0;
scanf("%d%d%d",&a,&b,&c);
average = (a + b + c)/3.0;
if(a>average)
count++;
if(b>average)
count++;
if(c>average)
count++;
if(count>=2)
printf("Yes\n");
else printf("No\n");
}
return 0;
}