/ 科创班 /

记录详情

Wrong Answer

/in/foo.c: In function 'main':
/in/foo.c:6:16: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'long long int *' [-Wformat=]
     scanf("%I64d", &n);
                ^
/in/foo.c:8:17: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long long int' [-Wformat=]
     printf("%I64d", sum);
                 ^
# 状态 耗时 内存占用
#1 Accepted 3ms 256.0 KiB
#2 Accepted 3ms 256.0 KiB
#3 Accepted 3ms 256.0 KiB
#4 Accepted 2ms 256.0 KiB
#5 Accepted 2ms 256.0 KiB
#6 Wrong Answer 2ms 256.0 KiB
#7 Wrong Answer 2ms 256.0 KiB
#8 Wrong Answer 2ms 256.0 KiB
#9 Wrong Answer 2ms 256.0 KiB

代码

#include <stdio.h>

int main()
{
    long long n, sum;
    scanf("%I64d", &n);
    sum = (n + 1) * n / 2;
    printf("%I64d", sum);
    return 0;
}

信息

递交者
类型
递交
题目
序列求和 c
题目数据
下载
语言
C
递交时间
2018-10-20 16:49:38
评测时间
2018-10-20 16:49:38
评测机
分数
50
总耗时
26ms
峰值内存
256.0 KiB