結果

問題 No.1544 [Cherry 2nd Tune C] Synchroscope
ユーザー titiatitia
提出日時 2021-06-11 21:24:10
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 146 ms / 2,000 ms
コード長 232 bytes
コンパイル時間 190 ms
コンパイル使用メモリ 82,520 KB
実行使用メモリ 62,996 KB
最終ジャッジ日時 2024-05-08 16:45:33
合計ジャッジ時間 4,515 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
52,488 KB
testcase_01 AC 37 ms
52,796 KB
testcase_02 AC 38 ms
52,448 KB
testcase_03 AC 42 ms
60,884 KB
testcase_04 AC 41 ms
60,712 KB
testcase_05 AC 41 ms
60,428 KB
testcase_06 AC 42 ms
59,980 KB
testcase_07 AC 42 ms
60,980 KB
testcase_08 AC 42 ms
61,708 KB
testcase_09 AC 42 ms
60,308 KB
testcase_10 AC 42 ms
60,368 KB
testcase_11 AC 41 ms
60,220 KB
testcase_12 AC 42 ms
61,436 KB
testcase_13 AC 41 ms
59,656 KB
testcase_14 AC 42 ms
61,468 KB
testcase_15 AC 42 ms
61,920 KB
testcase_16 AC 43 ms
60,616 KB
testcase_17 AC 42 ms
59,812 KB
testcase_18 AC 42 ms
59,812 KB
testcase_19 AC 43 ms
60,864 KB
testcase_20 AC 43 ms
61,648 KB
testcase_21 AC 41 ms
60,516 KB
testcase_22 AC 41 ms
59,204 KB
testcase_23 AC 42 ms
61,392 KB
testcase_24 AC 42 ms
60,920 KB
testcase_25 AC 41 ms
60,872 KB
testcase_26 AC 40 ms
62,004 KB
testcase_27 AC 42 ms
62,632 KB
testcase_28 AC 41 ms
61,724 KB
testcase_29 AC 42 ms
61,296 KB
testcase_30 AC 42 ms
61,576 KB
testcase_31 AC 42 ms
61,960 KB
testcase_32 AC 42 ms
62,996 KB
testcase_33 AC 146 ms
61,276 KB
testcase_34 AC 37 ms
52,144 KB
testcase_35 AC 37 ms
53,424 KB
testcase_36 AC 42 ms
61,140 KB
testcase_37 AC 41 ms
60,104 KB
testcase_38 AC 141 ms
61,468 KB
testcase_39 AC 141 ms
61,844 KB
testcase_40 AC 142 ms
61,828 KB
testcase_41 AC 141 ms
62,084 KB
testcase_42 AC 139 ms
61,252 KB
testcase_43 AC 137 ms
60,972 KB
testcase_44 AC 137 ms
61,128 KB
testcase_45 AC 141 ms
62,000 KB
testcase_46 AC 138 ms
61,340 KB
testcase_47 AC 138 ms
62,612 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

N,M=map(int,input().split())
A=list(map(int,input().split()))
B=list(map(int,input().split()))

for i in range(N*M):
    if A[i%N]==B[i%M]:
        print(i+1)
        break
else:
    print(-1)
0