結果

問題 No.161 制限ジャンケン
ユーザー %20%20
提出日時 2017-08-19 00:09:25
言語 Perl
(5.38.2)
結果
WA  
実行時間 -
コード長 327 bytes
コンパイル時間 624 ms
コンパイル使用メモリ 5,888 KB
実行使用メモリ 6,016 KB
最終ジャッジ日時 2024-04-22 15:56:10
合計ジャッジ時間 1,368 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 8 ms
6,016 KB
testcase_02 AC 7 ms
6,016 KB
testcase_03 AC 6 ms
6,016 KB
testcase_04 AC 7 ms
6,016 KB
testcase_05 AC 7 ms
5,888 KB
testcase_06 AC 7 ms
6,016 KB
testcase_07 AC 7 ms
6,016 KB
testcase_08 AC 7 ms
6,016 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 7 ms
6,016 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 7 ms
5,888 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 8 ms
5,888 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

($g,$c,$p)=glob<>;
$$_++for<>=~/./g;
if($g>=$C){$%+=3*$C;$g-=$C;$C=0;}else{$%+=3*$g;$g=0;$C-=$g;}
if($c>=$P){$%+=3*$P;$c-=$P;$P=0;}else{$%+=3*$c;$c=0;$P-=$c;}
if($p>=$G){$%+=3*$G;$p-=$G;$G=0;}else{$%+=3*$p;$p=0;$G-=$p;}
if($g>=$G){$%+=$G;}else{$%+=$g;}
if($c>=$C){$%+=$C;}else{$%+=$c;}
if($p>=$P){$%+=$P;}else{$%+=$p;}
print$%
0