結果

問題 No.1544 [Cherry 2nd Tune C] Synchroscope
ユーザー dangodango
提出日時 2023-06-25 11:55:21
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 180 ms / 2,000 ms
コード長 222 bytes
コンパイル時間 343 ms
コンパイル使用メモリ 87,028 KB
実行使用メモリ 76,716 KB
最終ジャッジ日時 2023-09-15 08:36:10
合計ジャッジ時間 6,674 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,696 KB
testcase_01 AC 72 ms
71,204 KB
testcase_02 AC 73 ms
71,340 KB
testcase_03 AC 80 ms
76,440 KB
testcase_04 AC 78 ms
76,592 KB
testcase_05 AC 78 ms
76,508 KB
testcase_06 AC 76 ms
76,604 KB
testcase_07 AC 76 ms
76,432 KB
testcase_08 AC 77 ms
76,444 KB
testcase_09 AC 78 ms
76,568 KB
testcase_10 AC 77 ms
76,504 KB
testcase_11 AC 77 ms
76,408 KB
testcase_12 AC 77 ms
76,460 KB
testcase_13 AC 77 ms
76,468 KB
testcase_14 AC 78 ms
76,616 KB
testcase_15 AC 78 ms
76,524 KB
testcase_16 AC 77 ms
76,528 KB
testcase_17 AC 78 ms
76,668 KB
testcase_18 AC 75 ms
76,512 KB
testcase_19 AC 76 ms
76,436 KB
testcase_20 AC 77 ms
76,568 KB
testcase_21 AC 77 ms
76,684 KB
testcase_22 AC 76 ms
76,456 KB
testcase_23 AC 77 ms
76,540 KB
testcase_24 AC 77 ms
76,572 KB
testcase_25 AC 76 ms
76,284 KB
testcase_26 AC 76 ms
76,440 KB
testcase_27 AC 78 ms
76,672 KB
testcase_28 AC 78 ms
76,516 KB
testcase_29 AC 78 ms
76,520 KB
testcase_30 AC 76 ms
76,460 KB
testcase_31 AC 76 ms
76,444 KB
testcase_32 AC 78 ms
76,604 KB
testcase_33 AC 180 ms
76,680 KB
testcase_34 AC 70 ms
71,220 KB
testcase_35 AC 71 ms
71,424 KB
testcase_36 AC 75 ms
76,596 KB
testcase_37 AC 75 ms
76,568 KB
testcase_38 AC 161 ms
76,628 KB
testcase_39 AC 161 ms
76,716 KB
testcase_40 AC 161 ms
76,652 KB
testcase_41 AC 162 ms
76,404 KB
testcase_42 AC 162 ms
76,604 KB
testcase_43 AC 160 ms
76,512 KB
testcase_44 AC 161 ms
76,676 KB
testcase_45 AC 159 ms
76,280 KB
testcase_46 AC 158 ms
76,512 KB
testcase_47 AC 157 ms
76,604 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, M = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
i = 0
while i < N * M:
    if A[i % N] == B[i % M]:
        print(i + 1)
        break
    i += 1
else:
    print(-1)
0