結果

問題 No.1544 [Cherry 2nd Tune C] Synchroscope
ユーザー pluto77
提出日時 2022-02-13 14:07:21
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
TLE  
実行時間 -
コード長 184 bytes
コンパイル時間 90 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 17,824 KB
最終ジャッジ日時 2024-06-29 05:34:56
合計ジャッジ時間 4,940 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 33 TLE * 1 -- * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

#yuki1514
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]:continue
 print(i+1)
 exit()
print(-1)
0