結果

問題 No.1544 [Cherry 2nd Tune C] Synchroscope
ユーザー pluto77pluto77
提出日時 2022-02-11 11:33:06
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 235 bytes
コンパイル時間 96 ms
コンパイル使用メモリ 10,704 KB
実行使用メモリ 402,396 KB
最終ジャッジ日時 2023-09-09 12:27:29
合計ジャッジ時間 14,715 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 18 ms
8,240 KB
testcase_01 AC 17 ms
7,868 KB
testcase_02 AC 17 ms
8,248 KB
testcase_03 AC 37 ms
22,140 KB
testcase_04 AC 158 ms
119,680 KB
testcase_05 AC 193 ms
149,372 KB
testcase_06 AC 286 ms
195,556 KB
testcase_07 AC 235 ms
188,368 KB
testcase_08 AC 156 ms
124,520 KB
testcase_09 AC 37 ms
21,144 KB
testcase_10 AC 232 ms
184,604 KB
testcase_11 AC 52 ms
34,904 KB
testcase_12 AC 74 ms
53,420 KB
testcase_13 AC 37 ms
22,736 KB
testcase_14 AC 315 ms
252,020 KB
testcase_15 AC 381 ms
295,356 KB
testcase_16 AC 122 ms
93,456 KB
testcase_17 AC 22 ms
10,968 KB
testcase_18 AC 25 ms
13,848 KB
testcase_19 AC 45 ms
28,904 KB
testcase_20 AC 304 ms
244,752 KB
testcase_21 AC 71 ms
51,368 KB
testcase_22 AC 37 ms
23,508 KB
testcase_23 AC 564 ms
399,396 KB
testcase_24 AC 578 ms
399,512 KB
testcase_25 AC 558 ms
399,504 KB
testcase_26 AC 549 ms
399,480 KB
testcase_27 AC 549 ms
399,656 KB
testcase_28 AC 553 ms
399,660 KB
testcase_29 AC 555 ms
399,664 KB
testcase_30 AC 558 ms
399,520 KB
testcase_31 AC 564 ms
399,556 KB
testcase_32 AC 555 ms
399,524 KB
testcase_33 AC 18 ms
8,416 KB
testcase_34 AC 16 ms
8,148 KB
testcase_35 AC 16 ms
7,968 KB
testcase_36 AC 17 ms
8,452 KB
testcase_37 AC 18 ms
8,356 KB
testcase_38 TLE -
testcase_39 -- -
testcase_40 -- -
testcase_41 -- -
testcase_42 -- -
testcase_43 -- -
testcase_44 -- -
testcase_45 -- -
testcase_46 -- -
testcase_47 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#yuki1544
import math
n,m=map(int,input().split())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
a=a*(m//math.gcd(n,m))
b=b*(n//math.gcd(n,m))
for i in range(len(a)):
 if a[i]==b[i]:
  print(i+1)
  exit()
print(-1)
0