結果
| 問題 |
No.161 制限ジャンケン
|
| コンテスト | |
| ユーザー |
%20
|
| 提出日時 | 2017-08-19 00:09:25 |
| 言語 | Perl (5.40.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 327 bytes |
| コンパイル時間 | 495 ms |
| コンパイル使用メモリ | 6,948 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-10-14 15:02:44 |
| 合計ジャッジ時間 | 1,318 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 8 WA * 8 |
コンパイルメッセージ
Main.pl syntax OK
ソースコード
($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$%
%20