結果
問題 | No.191 供託金 |
ユーザー |
![]() |
提出日時 | 2017-03-17 20:11:08 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 318 bytes |
コンパイル時間 | 485 ms |
コンパイル使用メモリ | 64,172 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-07-04 13:43:49 |
合計ジャッジ時間 | 1,446 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | WA * 23 |
コンパイルメッセージ
main.cpp: In function 'int main()': main.cpp:15:20: warning: 'cnt' may be used uninitialized [-Wmaybe-uninitialized] 15 | cout << cnt << "\n"; | ^~~~ main.cpp:5:11: note: 'cnt' was declared here 5 | int n,cnt; | ^~~
ソースコード
#include <iostream> using namespace std; int main(){ int n,cnt; long long c[100000]; long long sum = 0; cin >> n; for(int i = 0; i < n; i++){ cin >> c[i]; sum += c[i]; } for(int i = 0; i < n; i++){ if(sum/10>=c[i]){ cnt+=30; } } cout << cnt << "\n"; return 0; }