結果

問題 No.842 初詣
ユーザー kotatsugame
提出日時 2019-06-28 23:01:25
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 262 bytes
コンパイル時間 513 ms
コンパイル使用メモリ 65,944 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-02 05:05:45
合計ジャッジ時間 1,245 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 21
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:5:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    5 | main()
      | ^~~~

ソースコード

diff #

#include<iostream>
#include<algorithm>
using namespace std;
int A,B,C,D,E,F,G;
main()
{
	cin>>A>>B>>C>>D>>E>>F>>G;
	G-=min(G/500,A)*500;
	G-=min(G/100,B)*100;
	G-=min(G/50,C)*50;
	G-=min(G/10,D)*10;
	G-=min(G/5,E)*5;
	G-=min(G,F);
	cout<<(G?"NO":"YES")<<endl;
}
0