結果
| 問題 |
No.32 貯金箱の憂鬱
|
| コンテスト | |
| ユーザー |
184
|
| 提出日時 | 2014-09-30 23:55:49 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 5,000 ms |
| コード長 | 212 bytes |
| コンパイル時間 | 120 ms |
| コンパイル使用メモリ | 22,400 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-23 01:57:34 |
| 合計ジャッジ時間 | 706 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 12 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:6:24: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
6 | int l,n,m;scanf("%d%d%d",&l,&n,&m);
| ~~~~~^~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
int main(){
int l,n,m;scanf("%d%d%d",&l,&n,&m);
int ans=0;
int a=(l*100+n*25+m*1)%1000;
l=a/100;
a%=100;
m=a/25;
a%=25;
n=a;
printf("%d\n",l+m+n);
return 0;
}
184