結果

問題 No.1015 おつりは要らないです
ユーザー tailstails
提出日時 2020-04-16 10:02:45
言語 Perl
(5.40.0)
結果
AC  
実行時間 890 ms / 2,000 ms
コード長 198 bytes
コンパイル時間 843 ms
コンパイル使用メモリ 76,784 KB
実行使用メモリ 126,820 KB
最終ジャッジ日時 2024-11-18 07:20:00
合計ジャッジ時間 24,279 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 33
権限があれば一括ダウンロードができます
コンパイルメッセージ
Name "main::n" used only once: possible typo at Main.pl line 1.
Name "main::Z" used only once: possible typo at Main.pl line 1.
Name "main::X" used only once: possible typo at Main.pl line 1.
Name "main::Y" used only once: possible typo at Main.pl line 1.
Main.pl syntax OK

ソースコード

diff #

sub f{(*v,$m)=@_;$v&&[$v-=($t=$v-($-=$v-int$_/$m))?$t+!++$a[$_-$t*$m]:1]}($n,$X,$Y,$Z)=glob<>;++$a[$_/1e3]for glob<>;map{f(Z,10)||f(Y,5)||f(X,1)||exit!print'No'while$a[$_]--}sort{1}0..1e6;print'Yes'
0