結果
| 問題 |
No.32 貯金箱の憂鬱
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-11-23 20:12:45 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 5,000 ms |
| コード長 | 256 bytes |
| コンパイル時間 | 302 ms |
| コンパイル使用メモリ | 20,480 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-23 02:12:43 |
| 合計ジャッジ時間 | 673 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / 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;
}