Submission #00031


ソースコード

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
#include<bits/stdc++.h>
using namespace std;
// #define INF 0xfffffff
// #define fr first
// #define sc second
// typedef long long ll;
// typedef pair<int, int> Pii;
int main(){
int n;
int bug=0,cnt=0;
double av;
int sf;
cin>>n;
for(int i=0;i<n;i++){
cin>>sf;
if(sf>0) cnt++;
bug+=sf;
}
av=(double)bug/cnt+0.9;
cout<<(int)av<<endl;
}

ステータス

項目 データ
問題 0002 - 回れ雛月花 -Easy
ユーザー名 ei1437
投稿日時 2016-04-27 16:52:15
言語 C++
状態 Accepted
得点 100
ソースコード長 1061 Byte
最大実行時間 14 ms
最大メモリ使用量 696 KB

セット

セット 得点 Cases
1 ALL 100 / 100 *

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
abc015_b_in1.txt AC 11 ms 476 KB
1
abc015_b_in2.txt AC 12 ms 456 KB
1
abc015_b_in3.txt AC 13 ms 432 KB
1
abc015_b_in4.txt AC 13 ms 540 KB
1
abc015_b_in5.txt AC 16 ms 644 KB
1