Submission #121950


Source Code Expand

Copy
#define _CRT_SECURE_NO_WARNINGS
#include <string>
#include <vector>
#include <algorithm>
#include <numeric>
#include <set>
#include <map>
#include <queue>
#include <iostream>
#include <sstream>
#include <cstdio>
#include <cmath>
#include <ctime>
#include <cstring>
#include <cctype>
#include <list>
#include <cassert>
#define rep(i,n) for(int (i)=0;(i)<(int)(n);++(i))
#define rer(i,l,u) for(int (i)=(int)(l);(i)<=(int)(u);++(i))
#define reu(i,l,u) for(int (i)=(int)(l);(i)<(int)(u);++(i))
#if defined(_MSC_VER) || __cplusplus > 199711L
#define aut(r,v) auto r = (v)
#else
#define aut(r,v) typeof(v) r = (v)
#endif
#define each(it,o) for(aut(it, (o).begin()); it != (o).end(); ++ it)
#define all(o) (o).begin(), (o).end()
#define pb(x) push_back(x)
#define mp(x,y) make_pair((x),(y))
#define mset(m,v) memset(m,v,sizeof(m))
#define INF 0x3f3f3f3f
#define INFL 0x3f3f3f3f3f3f3f3fLL
#define EPS 1e-9
using namespace std;
typedef vector<int> vi; typedef pair<int,int> pii; typedef vector<pair<int,int> > vpii;
typedef long long ll; typedef vector<long long> vl; typedef pair<long long,long long> pll; typedef vector<pair<long long,long long> > vpll;
typedef vector<string> vs; typedef long double ld;

int main() {
	int N;
	cin >> N;
	double r = 0;
	rer(i, 1, N) r += 10000. / N * i;
	printf("%.10f\n", r);
	return 0;
}

Submission Info

Submission Time
Task A - AtCoder社の給料
User anta
Language C++ (G++ 4.6.4)
Score 100
Code Size 1363 Byte
Status AC
Exec Time 23 ms
Memory 932 KB

Judge Result

Set Name All
Score / Max Score 100 / 100
Status
AC × 14
Set Name Test Cases
All 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 AC 23 ms 768 KB
00_sample_02.txt AC 22 ms 808 KB
test_100.txt AC 21 ms 804 KB
test_14.txt AC 21 ms 676 KB
test_29.txt AC 21 ms 932 KB
test_4.txt AC 21 ms 808 KB
test_42.txt AC 20 ms 920 KB
test_48.txt AC 21 ms 680 KB
test_54.txt AC 21 ms 804 KB
test_59.txt AC 21 ms 808 KB
test_71.txt AC 21 ms 932 KB
test_72.txt AC 21 ms 740 KB
test_84.txt AC 21 ms 744 KB
test_96.txt AC 21 ms 800 KB