結果
問題 | No.548 国士無双 |
ユーザー | PicklesSuperior |
提出日時 | 2018-10-13 04:08:08 |
言語 | PHP (8.3.4) |
結果 |
AC
|
実行時間 | 45 ms / 2,000 ms |
コード長 | 1,823 bytes |
コンパイル時間 | 5,498 ms |
コンパイル使用メモリ | 32,200 KB |
実行使用メモリ | 32,788 KB |
最終ジャッジ日時 | 2023-10-17 17:31:06 |
合計ジャッジ時間 | 7,496 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 44 ms
32,788 KB |
testcase_01 | AC | 44 ms
32,788 KB |
testcase_02 | AC | 43 ms
32,788 KB |
testcase_03 | AC | 43 ms
32,788 KB |
testcase_04 | AC | 44 ms
32,788 KB |
testcase_05 | AC | 44 ms
32,788 KB |
testcase_06 | AC | 43 ms
32,788 KB |
testcase_07 | AC | 44 ms
32,788 KB |
testcase_08 | AC | 44 ms
32,788 KB |
testcase_09 | AC | 44 ms
32,788 KB |
testcase_10 | AC | 44 ms
32,788 KB |
testcase_11 | AC | 44 ms
32,788 KB |
testcase_12 | AC | 44 ms
32,788 KB |
testcase_13 | AC | 44 ms
32,788 KB |
testcase_14 | AC | 44 ms
32,788 KB |
testcase_15 | AC | 45 ms
32,788 KB |
testcase_16 | AC | 44 ms
32,788 KB |
testcase_17 | AC | 44 ms
32,788 KB |
testcase_18 | AC | 44 ms
32,788 KB |
testcase_19 | AC | 44 ms
32,788 KB |
testcase_20 | AC | 44 ms
32,788 KB |
testcase_21 | AC | 44 ms
32,788 KB |
testcase_22 | AC | 44 ms
32,788 KB |
testcase_23 | AC | 43 ms
32,788 KB |
コンパイルメッセージ
No syntax errors detected in Main.php
ソースコード
<?php $input = fgets(STDIN); $thirteen = array_fill(0,13,0); $ans; $sample = array("a","b","c","d","e","f","g","h","i","j","k","l","m"); $count = 0; /* for($i=0;$i<13;$i++){ print($thirteen[$i] . "\n"); } print("\n"); */ for($i = 0;$i < 13;$i++){ switch($input[$i]){ case "a": $thirteen[0] += 1; break; case "b": $thirteen[1] += 1; break; case "c": $thirteen[2] += 1; break; case "d": $thirteen[3] += 1; break; case "e": $thirteen[4] += 1; break; case "f": $thirteen[5] += 1; break; case "g": $thirteen[6] += 1; break; case "h": $thirteen[7] += 1; break; case "i": $thirteen[8] += 1; break; case "j": $thirteen[9] += 1; break; case "k": $thirteen[10] += 1; break; case "l": $thirteen[11] += 1; break; case "m": $thirteen[12] += 1; break; } } /* for($i=0;$i<13;$i++){ print($thirteen[$i] . "\n"); } */ for($i = 0;$i < 13;$i++){ if($thirteen[$i] == 0){ $ans = $sample[$i]; $count += 1; } } if($count == 0){ foreach($sample as $elem){ print($elem . "\n"); } }else if($count == 1){ print $ans . "\n"; }else{ print "Impossible\n"; } ?>