結果
| 問題 |
No.32 貯金箱の憂鬱
|
| コンテスト | |
| ユーザー |
TLwiegehtt
|
| 提出日時 | 2015-07-07 02:40:49 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 5,000 ms |
| コード長 | 354 bytes |
| コンパイル時間 | 92 ms |
| コンパイル使用メモリ | 20,608 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-23 02:05:17 |
| 合計ジャッジ時間 | 639 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 12 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:9:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
9 | scanf("%d", &L);
| ^~~~~~~~~~~~~~~
main.c:10:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
10 | scanf("%d", &M);
| ^~~~~~~~~~~~~~~
main.c:11:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
11 | scanf("%d", &N);
| ^~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
int main(void){
int L,M,N;
int temp;
int money;
scanf("%d", &L);
scanf("%d", &M);
scanf("%d", &N);
temp = N/25;
N = N%25;
M += temp;
money = M*25;
temp = money/100;
M = M - ((temp*100)/25);
L += temp;
money = L*100;
temp = money/1000;
L = L - ((temp*1000)/100);
printf("%d\n", (L+M+N));
return 0;
}
TLwiegehtt