結果

問題 No.1544 [Cherry 2nd Tune C] Synchroscope
ユーザー kept1994kept1994
提出日時 2021-08-28 02:32:55
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 695 ms / 2,000 ms
コード長 332 bytes
コンパイル時間 246 ms
コンパイル使用メモリ 82,504 KB
実行使用メモリ 62,392 KB
最終ジャッジ日時 2024-05-01 07:37:24
合計ジャッジ時間 10,656 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
53,016 KB
testcase_01 AC 33 ms
52,816 KB
testcase_02 AC 32 ms
52,368 KB
testcase_03 AC 37 ms
61,212 KB
testcase_04 AC 38 ms
60,728 KB
testcase_05 AC 36 ms
60,152 KB
testcase_06 AC 39 ms
60,572 KB
testcase_07 AC 39 ms
59,780 KB
testcase_08 AC 39 ms
61,032 KB
testcase_09 AC 42 ms
60,880 KB
testcase_10 AC 36 ms
60,152 KB
testcase_11 AC 36 ms
59,588 KB
testcase_12 AC 38 ms
60,484 KB
testcase_13 AC 38 ms
59,892 KB
testcase_14 AC 39 ms
60,636 KB
testcase_15 AC 39 ms
61,716 KB
testcase_16 AC 40 ms
60,408 KB
testcase_17 AC 39 ms
60,020 KB
testcase_18 AC 39 ms
60,360 KB
testcase_19 AC 37 ms
59,524 KB
testcase_20 AC 36 ms
61,616 KB
testcase_21 AC 35 ms
59,940 KB
testcase_22 AC 35 ms
59,856 KB
testcase_23 AC 39 ms
61,060 KB
testcase_24 AC 39 ms
61,052 KB
testcase_25 AC 38 ms
62,392 KB
testcase_26 AC 38 ms
61,392 KB
testcase_27 AC 39 ms
60,680 KB
testcase_28 AC 40 ms
61,280 KB
testcase_29 AC 42 ms
60,912 KB
testcase_30 AC 40 ms
61,700 KB
testcase_31 AC 39 ms
61,600 KB
testcase_32 AC 39 ms
61,580 KB
testcase_33 AC 647 ms
61,548 KB
testcase_34 AC 35 ms
52,404 KB
testcase_35 AC 34 ms
52,328 KB
testcase_36 AC 41 ms
60,332 KB
testcase_37 AC 39 ms
59,652 KB
testcase_38 AC 646 ms
61,548 KB
testcase_39 AC 653 ms
60,316 KB
testcase_40 AC 658 ms
60,948 KB
testcase_41 AC 663 ms
61,648 KB
testcase_42 AC 658 ms
61,576 KB
testcase_43 AC 620 ms
61,340 KB
testcase_44 AC 637 ms
60,840 KB
testcase_45 AC 695 ms
61,212 KB
testcase_46 AC 681 ms
60,928 KB
testcase_47 AC 652 ms
60,536 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python3
import sys


def main():
    N, M = map(int, input().split())
    A = list(map(int, input().split()))
    B = list(map(int, input().split()))
    for i in range(M * N):
        if A[i % N] == B[i % M]:
            print(i + 1)
            return
    print(-1)
    return

if __name__ == '__main__':
    main()
0