結果
問題 |
No.518 ローマ数字の和
|
ユーザー |
![]() |
提出日時 | 2017-05-29 00:32:45 |
言語 | Perl (5.40.0) |
結果 |
AC
|
実行時間 | 4 ms / 2,000 ms |
コード長 | 218 bytes |
コンパイル時間 | 60 ms |
コンパイル使用メモリ | 6,688 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-21 16:05:09 |
合計ジャッジ時間 | 883 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 19 |
コンパイルメッセージ
Useless use of non-destructive substitution (s///r) in void context at Main.pl line 1. Useless use of a variable in void context at Main.pl line 1. Main.pl syntax OK
ソースコード
%h=@h=M1000CM900D500CD400C100XC90L50XL40X10IX9V5IV4I1=~/(\pl+)(\d*)/g;$r=join'|',sort{$b=~/../-$a=~/../}keys%h;<>;<>=~s/$r/$s+=$h{$&}/ger;$s>3999?print"ERROR":${(($_)=grep$h{$_}&&$s>=$h{$_},@h),print,$s-=$h{$_}while$s}