Submission #1073188


Source Code Expand

#include<stdio.h>
#include<string.h>
#include <stdlib.h>
void main(void)
{
	int n,k,bangou[10000],i,t,a,goukei=0;
	scanf("%d%d", &n,&k);
	for (i = 0; i < n; i++)
		scanf("%d", &bangou[i]);
	a = k;
	for (i = 0; i < k; i++)
	{
		for (t = i; t <a ; t++)
		{
			goukei += bangou[t];
		}
		a++;
	}
	printf("%d", goukei);

}

Submission Info

Submission Time
Task C - 総和
User hanpen123
Language C (Clang 3.8.0)
Score 0
Code Size 338 Byte
Status RE
Exec Time 135 ms
Memory 256 KB

Compile Error

./Main.c:4:1: warning: return type of 'main' is not 'int' [-Wmain-return-type]
void main(void)
^
./Main.c:4:1: note: change return type to 'int'
void main(void)
^~~~
int
1 warning generated.

Judge Result

Set Name sample subtask1 subtask2
Score / Max Score 0 / 0 0 / 50 0 / 50
Status
RE × 2
RE × 13
RE × 22
Set Name Test Cases
sample sample01.txt, sample02.txt
subtask1 00.txt, 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt, sample01.txt, sample02.txt
subtask2 00.txt, 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt, 11.txt, 12.txt, 13.txt, 14.txt, 15.txt, 16.txt, 17.txt, 18.txt, 19.txt, sample01.txt, sample02.txt
Case Name Status Exec Time Memory
00.txt RE 2 ms 128 KB
01.txt RE 2 ms 128 KB
02.txt RE 1 ms 128 KB
03.txt RE 2 ms 128 KB
04.txt RE 2 ms 128 KB
05.txt RE 2 ms 128 KB
06.txt RE 2 ms 128 KB
07.txt RE 2 ms 128 KB
08.txt RE 2 ms 128 KB
09.txt RE 2 ms 128 KB
10.txt RE 2 ms 128 KB
11.txt RE 135 ms 256 KB
12.txt RE 115 ms 256 KB
13.txt RE 114 ms 256 KB
14.txt RE 113 ms 256 KB
15.txt RE 114 ms 256 KB
16.txt RE 114 ms 256 KB
17.txt RE 116 ms 256 KB
18.txt RE 2 ms 256 KB
19.txt RE 114 ms 256 KB
sample01.txt RE 1 ms 128 KB
sample02.txt RE 2 ms 128 KB