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