Submission #121948


Source Code Expand

Copy
#include <cstdlib>
#include <cstring>
#include <memory>
#include <cstdio>
#include <fstream>
#include <iostream>
#include <cmath>
#include <string>
#include <sstream>
#include <stack>
#include <queue>
#include <vector>
#include <set>
#include <map>
#include <algorithm>
using namespace std;

typedef signed long long ll;

#undef _P
#define _P(...) (void)printf(__VA_ARGS__)

#define FOR(x,to) for(x=0;x<to;x++)
#define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++)
#define ZERO(a) memset(a,0,sizeof(a))
void _fill_int(int* p,int val,int rep) {int i;	FOR(i,rep) p[i]=val;}
#define FILL_INT(a,val) _fill_int((int*)a,val,sizeof(a)/4)
#define MINUS(a) _fill_int((int*)a,-1,sizeof(a)/4)
ll GETi() { ll i;scanf("%lld",&i); return i;}
//-------------------------------------------------------

void solve() {
	int f,i,j,k,l,x,y;
	int N;
	double r;
	cin>>N;
	FOR(i,N) r+=(i+1)*10000;
	cout << r/N << endl;
	
}


int main(int argc,char** argv){
	string s;
	for(int i=1;i<argc;i++) s+=argv[i],s+='\n';
	for(int i=s.size()-1;i>=0;i--) ungetc(s[i],stdin);
	solve();
	return 0;
}

Submission Info

Submission Time
Task A - AtCoder社の給料
User kmjp
Language C++ (G++ 4.6.4)
Score 100
Code Size 1133 Byte
Status
Exec Time 75 ms
Memory 924 KB

Compile Error

./Main.cpp: In function ‘ll GETi()’:
./Main.cpp:29:34: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]

Test Cases

Set Name Score / Max Score Test Cases
All 100 / 100 00_sample_01.txt, 00_sample_02.txt, test_100.txt, test_14.txt, test_29.txt, test_4.txt, test_42.txt, test_48.txt, test_54.txt, test_59.txt, test_71.txt, test_72.txt, test_84.txt, test_96.txt
Case Name Status Exec Time Memory
00_sample_01.txt 75 ms 796 KB
00_sample_02.txt 24 ms 832 KB
test_100.txt 22 ms 800 KB
test_14.txt 22 ms 924 KB
test_29.txt 22 ms 920 KB
test_4.txt 21 ms 748 KB
test_42.txt 22 ms 800 KB
test_48.txt 22 ms 920 KB
test_54.txt 23 ms 920 KB
test_59.txt 23 ms 924 KB
test_71.txt 22 ms 920 KB
test_72.txt 22 ms 920 KB
test_84.txt 21 ms 800 KB
test_96.txt 22 ms 732 KB