Contest Duration: - (local time) (120 minutes) Back to Home

Submission #122093

Source Code Expand

Copy
```#include <iostream>
#include <iomanip>
#include <algorithm>
#include <set>
#include <list>
#include <map>
#include <memory>
#include <numeric>
#include <complex>
#include <functional>
#include <utility>
#include <iomanip>
#include <iterator>
#include <vector>
#include <limits>
#include <set>
#include <stack>
#include <queue>
#include <deque>
#include <typeinfo>
#include <fstream>
#include <cstdio>
#include <cstdlib>
#include <string>
#include <cstring>
#include <cfloat>
#include <cassert>
#include <cmath>
#include <cctype>
#include <ctime>
#include <sstream>
#include <bitset>

#define reb(i,b,n) for(int i=(int)(b); i<(int)(n); i++)
#define rep(i,n) reb(i,0,n)
#define rer(i,n) for(int i=1; i<=n; i++)
#define rrep(i,n) for(int i = n-1; i >= 0; i--)
#define rreb(i,n,b) for(int i = n; i >= b; i--)
#define resz(i,v) rep(i,sz(v))
#define let(v, x) __typeof(x) v = (x)
#define each(it,v) for(let(it, (v).begin()); it!=(v).end(); it++)
#define reach(it,v) for(let(it, (v).rbegin());i!=(v).rend();i++)
#define priArr(table, n) rep(i,n){cout<<table[i]<<' ';}cout<<'\n';
#define priAr2(table,W,H) rep(y,H){rep(x,W)cout<<table[y][x]<<' ';cout<<'\n';}
#define vall(x) (x).begin(), (x).end()
#define rvall(x) (x).rbegin(), (x).rend()
#define vsort(v) sort(vall(v))
#define rvsort(v) sort(rvall(v))
#define len(array) (sizeof (array) / sizeof *(array))
#define aall(x) x, x+len(x)
#define asort(x) sort(aall(x))
#define rasort(a, type) sort(aall(a), greater<type>())
#define afill(a, v) fill(aall(a), v)
#define afill2(a, v, type) fill((type *)a, (type *)(a + len(a)), v)
#define sz(x) (int)(x).size()
#define mp(a, b) make_pair(a, b)
#define dmax(x,y) x = max(x,y);
#define dmin(x,y) x = min(x,y);
#define ddel(x,y) x = (x-(y)+MOD)%MOD;
#define dmul(x,y) x = ((ll)x*(y))%MOD;
#define snuke srand((unsigned)clock()+(unsigned)time(NULL))
#define fi first
#define se second
#define pb push_back
#define _USE_MATH_DEFINES

using std::stringstream;
using namespace std;

typedef long long ll; typedef unsigned long long ull;
typedef pair <int, int> P; typedef pair <int, P> PP;
typedef vector<int> vi;typedef vector<vi> vvi;typedef vector<string> vs;
typedef vector<ll> vl; typedef vector<P > vP; typedef vector<char> vc;
typedef long double ld;

const static int INF = 0x3f3f3f3f;
const static ll INFL = 0x3f3f3f3f3f3f3f3fLL;
const static double EPS = 1e-9;
const static ll MOD = 1000000007LL;

inline int toInt(std::string s) {int v; std::istringstream sin(s);sin>>v;return v;}
template<class T> inline std::string toString(T x) {std::ostringstream sout;sout<<x;return sout.str();}

int dx[] = {1,0,-1,0}, dy[] = {0,1,0,-1};
/* --------------------------------------------------------------- */

int main(int argc, char *argv[])
{
ios::sync_with_stdio(false);
cin.tie(0); // off the sync synchronous of cin and cout

int n;
cin >> n;
double ans=0;

double val = 10000;
reb(i, 1, n+1) {
ans += (val*i) / n;
}

cout << ans << endl;

return 0;
}
```

#### Submission Info

Submission Time 2013-12-12 21:08:51+0900 A - AtCoder社の給料 emacs C++ (G++ 4.6.4) 100 3126 Byte AC 23 ms 928 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 21 ms 796 KB
00_sample_02.txt AC 22 ms 740 KB
test_100.txt AC 21 ms 804 KB
test_14.txt AC 21 ms 808 KB
test_29.txt AC 20 ms 800 KB
test_4.txt AC 20 ms 804 KB
test_42.txt AC 20 ms 800 KB
test_48.txt AC 20 ms 804 KB
test_54.txt AC 21 ms 928 KB
test_59.txt AC 22 ms 804 KB
test_71.txt AC 22 ms 924 KB
test_72.txt AC 20 ms 808 KB
test_84.txt AC 23 ms 804 KB
test_96.txt AC 22 ms 928 KB