結果
| 問題 |
No.32 貯金箱の憂鬱
|
| コンテスト | |
| ユーザー |
fumi6328
|
| 提出日時 | 2018-07-04 19:29:16 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 5,000 ms |
| コード長 | 245 bytes |
| コンパイル時間 | 135 ms |
| コンパイル使用メモリ | 22,400 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-23 07:14:06 |
| 合計ジャッジ時間 | 681 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 12 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:8:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
8 | scanf("%d",&L);
| ~~~~~^~~~~~~~~
main.cpp:9:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
9 | scanf("%d",&M);
| ~~~~~^~~~~~~~~
main.cpp:10:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
10 | scanf("%d",&N);
| ~~~~~^~~~~~~~~
ソースコード
#include<stdio.h>
int main()
{
int L,M,N;
int a,b,c;
int sum;
scanf("%d",&L);
scanf("%d",&M);
scanf("%d",&N);
sum=100*L+25*M+N;
a=(sum%1000)/100;
b=(sum%100)/25;
c=sum%25;
printf("%d",a+b+c);
return 0;
}
fumi6328