結果
問題 |
No.32 貯金箱の憂鬱
|
ユーザー |
![]() |
提出日時 | 2017-08-08 11:48:28 |
言語 | C90 (gcc 12.3.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 257 bytes |
コンパイル時間 | 86 ms |
コンパイル使用メモリ | 20,224 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-12 00:09:46 |
合計ジャッジ時間 | 2,229 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | RE * 12 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:5:17: warning: format ‘%d’ expects argument of type ‘int *’, but argument 2 has type ‘int’ [-Wformat=] 5 | scanf("%d%d%d", L, M, N); | ~^ ~ | | | | int * int main.c:5:19: warning: format ‘%d’ expects argument of type ‘int *’, but argument 3 has type ‘int’ [-Wformat=] 5 | scanf("%d%d%d", L, M, N); | ~^ ~ | | | | int * int main.c:5:21: warning: format ‘%d’ expects argument of type ‘int *’, but argument 4 has type ‘int’ [-Wformat=] 5 | scanf("%d%d%d", L, M, N); | ~^ ~ | | | | int * int main.c:5:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 5 | scanf("%d%d%d", L, M, N); | ^~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> int main(){ int L, M, N; scanf("%d%d%d", L, M, N); int a = L /25; if(a > 0){ L -= a * 25; M += a; } a = M / 4; if(a > 0){ M -= a * 4; N += a; } a = N / 10; if(a > 0) N -= a * 10; printf("%d\n", L + M + N); return 0; }