結果
| 問題 |
No.32 貯金箱の憂鬱
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-12-23 16:19:17 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 246 bytes |
| コンパイル時間 | 171 ms |
| コンパイル使用メモリ | 20,352 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-09-18 21:45:13 |
| 合計ジャッジ時間 | 766 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 1 WA * 11 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:6:3: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
6 | scanf("%d%d%d", &L, &M, &N); /* L:100 M:25 N:1 */
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
int main(void){
int L, M, N, sum, s, l, m, n;
scanf("%d%d%d", &L, &M, &N); /* L:100 M:25 N:1 */
sum = 100*L + 25*M + N;
l = sum / 100;
s=sum%100;
m=s/25;
s=s%25;
n=s;
printf("%d\n", l+m+n);
return 0;
}