Submission #00020
ソースコード
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | #include<bits/stdc++.h> using namespace std; #define ll long long #define mp make_pair #define pb push_back #define fr first #define sc second #define Rep(i,n) for(int i=0;i<(n);i++) #define Rrep(i, m, n) for(int i=(m);i<(n);i++) #define All(v) v.begin(),v.end() #define Uniq(v) v.erase(unique(All(v)),v.end()) typedef pair< int , int > Pii; typedef pair< int , Pii> Pip; typedef pair<string, int > Psi; typedef vector< int > Vi; const int INF = (1<<30); const int dx[]={1,0,-1,0}, dy[]={0,-1,0,1}; int main() { int n; double sum = 0, cnt = 0; cin >> n; Rep(i, n) { double a; cin >> a; if ( a != 0 ) { cnt++; sum += a; } } double ans = ceil ( sum / cnt ); cout << ans << endl; } |
ステータス
項目 | データ |
---|---|
問題 | 0002 - 回れ雛月花 -Easy |
ユーザー名 | ei1506 |
投稿日時 | 2016-04-27 16:44:32 |
言語 | C++11 |
状態 | Wrong Answer |
得点 | 0 |
ソースコード長 | 733 Byte |
最大実行時間 | 14 ms |
最大メモリ使用量 | 516 KB |
セット
セット | 得点 | Cases | |
---|---|---|---|
1 | ALL | 0 / 100 | * |
テストケース
ファイル名 | 状態 | 実行時間 | メモリ使用量 | # |
---|---|---|---|---|
abc015_b_in1.txt | AC | 12 ms | 476 KB |
1
|
abc015_b_in2.txt | AC | 10 ms | 452 KB |
1
|
abc015_b_in3.txt | AC | 11 ms | 428 KB |
1
|
abc015_b_in4.txt | AC | 9 ms | 532 KB |
1
|
abc015_b_in5.txt | AC | 13 ms | 504 KB |
1
|