結果

問題 No.201 yukicoderじゃんけん
ユーザー
提出日時 2016-01-20 19:05:31
言語 PHP
(8.3.4)
結果
WA  
実行時間 -
コード長 520 bytes
コンパイル時間 258 ms
コンパイル使用メモリ 32,720 KB
実行使用メモリ 32,844 KB
最終ジャッジ日時 2023-10-21 13:36:24
合計ジャッジ時間 2,092 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 43 ms
32,688 KB
testcase_03 AC 43 ms
32,688 KB
testcase_04 AC 43 ms
32,688 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 43 ms
32,688 KB
testcase_11 AC 44 ms
32,688 KB
testcase_12 AC 43 ms
32,688 KB
testcase_13 WA -
testcase_14 AC 44 ms
32,688 KB
testcase_15 AC 45 ms
32,688 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 44 ms
32,688 KB
testcase_19 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?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";
}
0