Submission #122655


Source Code Expand

Copy
#include<stdio.h>
#include<float.h>


int task=0;
double	salary=0;

int main(){
	scanf_s("%d",&task);

	for(double i=1;i<=task;i++)
	{
		salary +=(i*10000)/task;
	}

	printf("%f\n",salary);
		return 0;
}

Submission Info

Submission Time
Task A - AtCoder社の給料
User itukorobu
Language C++ (GCC 4.4.7)
Score 0
Code Size 222 Byte
Status CE

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:9: error: ‘scanf_s’ was not declared in this scope