Submission #1768580
Source Code Expand
#include <bits/stdc++.h> #define ll long long #define ull long long unsigned using namespace std; #define foru(i,a,n) for (int i=(a); i<=(n); i++) #define ford(i,n,a) for (int i=(n); i>=(a); i--) #define rep(i,n) for(int i=0; i<n; i++) #define pb push_back #define mp make_pair #define all(x) (x).begin(),(x).end() #define fi first #define se second #define bit1cnt(x) (__builtin_popcountll(x)) #define sqr(x) ((x) * (x)) #define sz(x) ((int)(x.size())) #define Pi 3.14159265358979 #define ii pair<int,int> #define LL pair<ll,ll> const int N = 2e5; ll n; double ans = 0; int main(){ ///freopen("A.inp","r",stdin); ios::sync_with_stdio(0); cin.tie(0); cin >>n; foru(i, 1, n) ans += 1.0*i*10000 / n; cout <<fixed <<setprecision(0) <<ans; return 0; }
Submission Info
Submission Time | |
---|---|
Task | A - AtCoder社の給料 |
User | phuleethanh |
Language | C++14 (GCC 5.4.1) |
Score | 100 |
Code Size | 801 Byte |
Status | AC |
Exec Time | 1 ms |
Memory | 256 KB |
Judge Result
Set Name | All | ||
---|---|---|---|
Score / Max Score | 100 / 100 | ||
Status |
|
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 | 1 ms | 256 KB |
00_sample_02.txt | AC | 1 ms | 256 KB |
test_100.txt | AC | 1 ms | 256 KB |
test_14.txt | AC | 1 ms | 256 KB |
test_29.txt | AC | 1 ms | 256 KB |
test_4.txt | AC | 1 ms | 256 KB |
test_42.txt | AC | 1 ms | 256 KB |
test_48.txt | AC | 1 ms | 256 KB |
test_54.txt | AC | 1 ms | 256 KB |
test_59.txt | AC | 1 ms | 256 KB |
test_71.txt | AC | 1 ms | 256 KB |
test_72.txt | AC | 1 ms | 256 KB |
test_84.txt | AC | 1 ms | 256 KB |
test_96.txt | AC | 1 ms | 256 KB |