Submission #122015


Source Code Expand

#include<stdio.h>

int main(){
	int N,i;
	double sum=0;
	scanf("%d",&N);
	for(i=1;i<=N;i++){
		sum += sum + i*10000*(1.0/i)
	}
	printf("%d\n",sum);
	return 0;
}

Submission Info

Submission Time
Task A - AtCoder社の給料
User ferretdayo
Language C (GCC 4.6.4)
Score 0
Code Size 171 Byte
Status CE

Compile Error

./Main.c: In function ‘main’:
./Main.c:9:2: error: expected ‘;’ before ‘}’ token
./Main.c:10:2: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘double’ [-Wformat]
./Main.c:6:7: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]