結果

問題 No.32 貯金箱の憂鬱
ユーザー ryogomryogom
提出日時 2019-04-11 16:45:19
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 284 bytes
コンパイル時間 407 ms
コンパイル使用メモリ 50,840 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-25 21:56:09
合計ジャッジ時間 1,337 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 2 ms
4,380 KB
testcase_03 WA -
testcase_04 AC 2 ms
4,380 KB
testcase_05 WA -
testcase_06 AC 2 ms
4,380 KB
testcase_07 AC 2 ms
4,380 KB
testcase_08 AC 1 ms
4,376 KB
testcase_09 AC 2 ms
4,380 KB
testcase_10 AC 2 ms
4,380 KB
testcase_11 AC 2 ms
4,380 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:21:11: warning: ‘c’ may be used uninitialized in this function [-Wmaybe-uninitialized]
 cout<<a+b+c<<endl;
           ^
main.cpp:17:5: warning: ‘e’ may be used uninitialized in this function [-Wmaybe-uninitialized]
 if(l+e>=10){
    ~^~
main.cpp:21:8: warning: ‘b’ may be used uninitialized in this function [-Wmaybe-uninitialized]
 cout<<a+b+c<<endl;
       ~^~
main.cpp:13:5: warning: ‘d’ may be used uninitialized in this function [-Wmaybe-uninitialized]
 if(m+d>=4){
    ~^~
main.cpp:21:8: warning: ‘a’ may be used uninitialized in this function [-Wmaybe-uninitialized]
 cout<<a+b+c<<endl;
       ~^~

ソースコード

diff #

#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;   
}
0