結果
問題 | No.201 yukicoderじゃんけん |
ユーザー |
|
提出日時 | 2016-01-20 19:05:31 |
言語 | PHP (843.2) |
結果 |
WA
|
実行時間 | - |
コード長 | 520 bytes |
コンパイル時間 | 117 ms |
コンパイル使用メモリ | 32,528 KB |
実行使用メモリ | 32,788 KB |
最終ジャッジ日時 | 2024-09-21 14:51:05 |
合計ジャッジ時間 | 1,748 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 9 WA * 11 |
コンパイルメッセージ
No syntax errors detected in Main.php
ソースコード
<?php $input1 = trim(fgets(STDIN)); list($player1,$player1Point,$player1hand) = explode(" ", $input1); $str1 = strlen($player1Point); $input2 = trim(fgets(STDIN)); list($player2,$player2Point,$player2hand) = explode(" ", $input2); $str2 = strlen($player2Point); if($str1 > $str2){ $str2 = str_pad($str2,$str1,"0",STR_PAD_LEFT); }else{ $str1 = str_pad($str1,$str2,"0",STR_PAD_LEFT); } if($str1 < $str2){ echo $player2."\n"; }else if($str1 > $str2){ echo $player1."\n"; }else{ echo "-1"."\n"; }