結果
| 問題 |
No.842 初詣
|
| コンテスト | |
| ユーザー |
silopy
|
| 提出日時 | 2019-08-11 17:39:27 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 338 bytes |
| コンパイル時間 | 658 ms |
| コンパイル使用メモリ | 67,800 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-09-13 20:11:47 |
| 合計ジャッジ時間 | 1,331 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 18 WA * 3 |
ソースコード
#include<iostream>
#include<algorithm>
using namespace std;
using lint=int64_t;
int main()
{
int input[10]{};
int yen[]={500,100,50,10,5,1};
for(int i=0;i<7;i++)
cin >> input[i];
int sum=input[6];
for(int i=0;i<6;i++)
sum=max(0,sum-yen[i]*input[i]);
if(sum==0)cout << "YES";
else cout << "NO";
cout << endl;
return 0;
}
silopy