結果
| 問題 |
No.32 貯金箱の憂鬱
|
| コンテスト | |
| ユーザー |
ryogom
|
| 提出日時 | 2019-04-11 16:45:45 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 284 bytes |
| コンパイル時間 | 432 ms |
| コンパイル使用メモリ | 54,004 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-18 17:39:11 |
| 合計ジャッジ時間 | 805 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 8 WA * 4 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:21:11: warning: ‘c’ may be used uninitialized in this function [-Wmaybe-uninitialized]
21 | cout<<a+b+c<<endl;
| ^
main.cpp:17:5: warning: ‘e’ may be used uninitialized in this function [-Wmaybe-uninitialized]
17 | if(l+e>=10){
| ~^~
main.cpp:21:8: warning: ‘b’ may be used uninitialized in this function [-Wmaybe-uninitialized]
21 | cout<<a+b+c<<endl;
| ~^~
main.cpp:13:5: warning: ‘d’ may be used uninitialized in this function [-Wmaybe-uninitialized]
13 | if(m+d>=4){
| ~^~
main.cpp:21:8: warning: ‘a’ may be used uninitialized in this function [-Wmaybe-uninitialized]
21 | cout<<a+b+c<<endl;
| ~^~
ソースコード
#include <iostream>
#include <string>
using namespace std;
int main(){
int l,m,n;
int a,b,c;
int d,e,f;
cin>>l>>m>>n;
if(n>=25){
a=n%25;
d=n/25;
}
if(m+d>=4){
b=(m+d)%4;
e=(m+d)/4;
}
if(l+e>=10){
c=(l+e)%10;
f=(l+e)/10;
}
cout<<a+b+c<<endl;
return 0;
}
ryogom