結果

問題 No.1544 [Cherry 2nd Tune C] Synchroscope
ユーザー titiatitia
提出日時 2022-02-10 01:00:14
言語 PyPy2
(7.3.15)
結果
AC  
実行時間 209 ms / 2,000 ms
コード長 231 bytes
コンパイル時間 1,643 ms
コンパイル使用メモリ 77,636 KB
実行使用メモリ 79,560 KB
最終ジャッジ日時 2023-09-07 11:33:49
合計ジャッジ時間 9,566 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
76,156 KB
testcase_01 AC 77 ms
76,384 KB
testcase_02 AC 76 ms
76,332 KB
testcase_03 AC 92 ms
79,496 KB
testcase_04 AC 83 ms
79,516 KB
testcase_05 AC 85 ms
79,136 KB
testcase_06 AC 85 ms
78,980 KB
testcase_07 AC 84 ms
78,808 KB
testcase_08 AC 85 ms
79,488 KB
testcase_09 AC 84 ms
79,172 KB
testcase_10 AC 83 ms
78,804 KB
testcase_11 AC 82 ms
79,112 KB
testcase_12 AC 83 ms
79,076 KB
testcase_13 AC 82 ms
79,112 KB
testcase_14 AC 83 ms
79,336 KB
testcase_15 AC 82 ms
79,144 KB
testcase_16 AC 82 ms
79,056 KB
testcase_17 AC 82 ms
78,948 KB
testcase_18 AC 82 ms
78,800 KB
testcase_19 AC 82 ms
79,396 KB
testcase_20 AC 82 ms
79,048 KB
testcase_21 AC 82 ms
79,160 KB
testcase_22 AC 81 ms
79,080 KB
testcase_23 AC 83 ms
79,352 KB
testcase_24 AC 85 ms
79,352 KB
testcase_25 AC 82 ms
79,428 KB
testcase_26 AC 84 ms
79,164 KB
testcase_27 AC 85 ms
79,336 KB
testcase_28 AC 84 ms
79,344 KB
testcase_29 AC 84 ms
79,528 KB
testcase_30 AC 83 ms
79,484 KB
testcase_31 AC 82 ms
79,484 KB
testcase_32 AC 84 ms
79,448 KB
testcase_33 AC 188 ms
79,560 KB
testcase_34 AC 77 ms
76,356 KB
testcase_35 AC 76 ms
76,128 KB
testcase_36 AC 83 ms
79,184 KB
testcase_37 AC 82 ms
79,480 KB
testcase_38 AC 198 ms
79,356 KB
testcase_39 AC 200 ms
79,192 KB
testcase_40 AC 202 ms
79,448 KB
testcase_41 AC 209 ms
79,168 KB
testcase_42 AC 199 ms
79,316 KB
testcase_43 AC 194 ms
79,324 KB
testcase_44 AC 197 ms
79,148 KB
testcase_45 AC 203 ms
79,468 KB
testcase_46 AC 201 ms
79,356 KB
testcase_47 AC 200 ms
79,408 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