Koi
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 277 Accepted Submission(s): 83
One day, Ox Comma Strong was walking with god yang, when they pass the YueYa Lake, OCS(Ox Comma Strong)point to a Koi in the lake:
God yang:”你不是鱼,你怎么知道转发会获得好运”
OCS:”你不是我,你怎么知道我知不知道转发会获得好运”
God yang:”你不是我,你怎么知道我知不知道你知不知道转发会获得好运”
。
。
。
In the first line there is an integer T (T <= 50), indicates the number of test cases.
In each case, there is an integer n(1 <= n <= 50).
For each case, output “Case #c:” in first line, where c is the case number start from 1.
For each n output the nth sentences.
Case #1: 转发此锦鲤将获得好运
Case #2: 你不是鱼,你怎么知道转发会获得好运
Case #3: 你不是我,你怎么知道我知不知道转发会获得好运
请留意输出中的空格和标点字符
AC代码:
#include #include char p[1500]; main() { int a,b,j,n,m,k,sum=0,len,i; scanf("%d",&m); for(n=1;n我的WA代码:
#include
int main()
{
int n,a,i,b;
scanf("%d",&n);
if(n>50||n50||a0;b--)
{
if(b%2==1)
{
printf("我知不知道");
}
else
{
printf("你知不知道");
}
}
printf("转发会获得好运n");
}
}
return 0;
}
错误在于没有考虑到第四句的情况,需要把第三句加到if里面……