結果
| 問題 |
No.201 yukicoderじゃんけん
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-01-20 19:08:27 |
| 言語 | PHP (843.2) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 647 bytes |
| コンパイル時間 | 75 ms |
| コンパイル使用メモリ | 31,104 KB |
| 実行使用メモリ | 31,464 KB |
| 最終ジャッジ日時 | 2024-09-21 14:51:07 |
| 合計ジャッジ時間 | 1,705 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 15 WA * 5 |
コンパイルメッセージ
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";
}
if($player1Point < $player2Point){
echo $player2."\n";
}else if($player1Point > $player2Point){
echo $player1."\n";
}else{
echo "-1"."\n";
}