結果
問題 |
No.32 貯金箱の憂鬱
|
ユーザー |
![]() |
提出日時 | 2018-07-04 19:20:28 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 261 bytes |
コンパイル時間 | 115 ms |
コンパイル使用メモリ | 22,400 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-07-01 02:14:38 |
合計ジャッジ時間 | 681 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 2 WA * 10 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:8:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 8 | scanf("%d",&L); | ~~~~~^~~~~~~~~ main.cpp:9:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 9 | scanf("%d",&M); | ~~~~~^~~~~~~~~ main.cpp:10:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 10 | scanf("%d",&N); | ~~~~~^~~~~~~~~
ソースコード
#include<stdio.h> int main() { int L,M,N; int a,b,c,d; int sum; scanf("%d",&L); scanf("%d",&M); scanf("%d",&N); sum=100*L+25*M+N; a=sum/1000; b=sum%1000/100; c=sum%100/25; d=sum%25; printf("%d",a+b+c+d-1); return 0; }