結果

問題 No.1544 [Cherry 2nd Tune C] Synchroscope
ユーザー takutakutakutaku
提出日時 2021-06-13 16:09:36
言語 PHP
(8.3.4)
結果
WA  
実行時間 -
コード長 471 bytes
コンパイル時間 1,320 ms
コンパイル使用メモリ 18,532 KB
実行使用メモリ 23,288 KB
最終ジャッジ日時 2023-08-24 19:09:12
合計ジャッジ時間 6,852 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
23,288 KB
testcase_01 WA -
testcase_02 AC 15 ms
18,896 KB
testcase_03 AC 17 ms
18,752 KB
testcase_04 AC 17 ms
18,756 KB
testcase_05 AC 18 ms
18,760 KB
testcase_06 AC 20 ms
18,796 KB
testcase_07 AC 19 ms
18,808 KB
testcase_08 AC 17 ms
18,832 KB
testcase_09 AC 20 ms
18,652 KB
testcase_10 AC 17 ms
18,896 KB
testcase_11 AC 17 ms
18,868 KB
testcase_12 AC 17 ms
18,876 KB
testcase_13 AC 17 ms
18,808 KB
testcase_14 AC 17 ms
18,876 KB
testcase_15 AC 17 ms
18,896 KB
testcase_16 AC 23 ms
18,980 KB
testcase_17 AC 17 ms
18,876 KB
testcase_18 AC 17 ms
18,832 KB
testcase_19 AC 17 ms
18,648 KB
testcase_20 AC 16 ms
18,760 KB
testcase_21 AC 17 ms
18,812 KB
testcase_22 AC 16 ms
18,892 KB
testcase_23 AC 20 ms
18,820 KB
testcase_24 AC 18 ms
18,812 KB
testcase_25 AC 17 ms
18,812 KB
testcase_26 AC 17 ms
18,880 KB
testcase_27 AC 22 ms
18,884 KB
testcase_28 AC 17 ms
18,816 KB
testcase_29 AC 18 ms
18,780 KB
testcase_30 AC 19 ms
18,800 KB
testcase_31 AC 19 ms
18,808 KB
testcase_32 AC 18 ms
18,812 KB
testcase_33 TLE -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
testcase_37 -- -
testcase_38 -- -
testcase_39 -- -
testcase_40 -- -
testcase_41 -- -
testcase_42 -- -
testcase_43 -- -
testcase_44 -- -
testcase_45 -- -
testcase_46 -- -
testcase_47 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
    
    $array_num = explode(" ",trim(fgets(STDIN)));
    $array_num_A = explode(" ",trim(fgets(STDIN)));
    $array_num_B = explode(" ",trim(fgets(STDIN)));
    
    $N = $array_num[0];
    $M = $array_num[1];
    $result = -1;
    
    for($i = 0; $i < $N*$M; $i++) {
        if($array_num_A[$i%$N] == $array_num_B[$i%$M]){
            echo $result + $i + 2;
            break;
        }
    }
    
    if($result!= -1) {
        echo $result;    
    }
    
?>
0