結果
| 問題 | No.32 貯金箱の憂鬱 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-11-23 20:12:45 |
| 言語 | C90(gcc12) (gcc 12.4.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 5,000 ms |
| コード長 | 256 bytes |
| 記録 | |
| コンパイル時間 | 135 ms |
| コンパイル使用メモリ | 28,744 KB |
| 最終ジャッジ日時 | 2026-02-23 19:54:31 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 12 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:7:3: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
7 | scanf("%d%d%d", &l, &m, &n);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
int main(){
int k, l, m, n;
int total;
scanf("%d%d%d", &l, &m, &n);
total=l*100+m*25+n;
k=total/1000;
total%=1000;
l=total/100;
total%=100;
m=total/25;
total%=25;
n=total;
printf("%d\n", l+m+n);
return 0;
}