/ 科创班 /

记录详情

Wrong Answer

/in/foo.c: In function 'main':
/in/foo.c:7:2: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
  if(a>0)
  ^~
/in/foo.c:12:3: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
   printf("%u\n",b);
   ^~~~~~
# 状态 耗时 内存占用
#1 Wrong Answer 2ms 256.0 KiB
#2 Accepted 2ms 256.0 KiB
#3 Accepted 2ms 256.0 KiB
#4 Accepted 2ms 256.0 KiB
#5 Accepted 2ms 256.0 KiB
#6 Accepted 2ms 256.0 KiB
#7 Accepted 2ms 256.0 KiB
#8 Accepted 2ms 256.0 KiB
#9 Accepted 1ms 256.0 KiB
#10 Accepted 2ms 256.0 KiB

代码

#include<stdio.h>
int main()
{
	int a,b,i;
	b=1;
	scanf("%u",&a);
	if(a>0)
		for(i=1;i<=a;i++)
		{
			b=b*i;
		}
		printf("%u\n",b);
		return 0;
}

信息

递交者
类型
递交
题目
求阶乘
题目数据
下载
语言
C
递交时间
2018-06-17 18:57:42
评测时间
2018-06-17 18:57:42
评测机
分数
90
总耗时
24ms
峰值内存
256.0 KiB