結果

問題 No.1544 [Cherry 2nd Tune C] Synchroscope
ユーザー simansiman
提出日時 2021-06-13 17:51:37
言語 Ruby
(3.3.0)
結果
TLE  
実行時間 -
コード長 171 bytes
コンパイル時間 325 ms
コンパイル使用メモリ 11,240 KB
実行使用メモリ 15,616 KB
最終ジャッジ日時 2023-08-24 20:50:00
合計ジャッジ時間 37,738 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
15,116 KB
testcase_01 AC 81 ms
15,080 KB
testcase_02 AC 80 ms
15,088 KB
testcase_03 AC 84 ms
15,132 KB
testcase_04 AC 84 ms
15,372 KB
testcase_05 AC 83 ms
15,444 KB
testcase_06 AC 84 ms
15,280 KB
testcase_07 AC 83 ms
15,404 KB
testcase_08 AC 83 ms
15,256 KB
testcase_09 AC 85 ms
15,196 KB
testcase_10 AC 83 ms
15,572 KB
testcase_11 AC 83 ms
15,220 KB
testcase_12 AC 85 ms
15,064 KB
testcase_13 AC 83 ms
15,192 KB
testcase_14 AC 84 ms
15,332 KB
testcase_15 AC 86 ms
15,580 KB
testcase_16 AC 87 ms
15,116 KB
testcase_17 AC 82 ms
15,156 KB
testcase_18 AC 82 ms
15,240 KB
testcase_19 AC 83 ms
15,032 KB
testcase_20 AC 83 ms
15,340 KB
testcase_21 AC 83 ms
15,044 KB
testcase_22 AC 82 ms
15,100 KB
testcase_23 AC 84 ms
15,384 KB
testcase_24 AC 83 ms
15,432 KB
testcase_25 AC 84 ms
15,448 KB
testcase_26 AC 84 ms
15,528 KB
testcase_27 AC 86 ms
15,384 KB
testcase_28 AC 84 ms
15,544 KB
testcase_29 AC 86 ms
15,588 KB
testcase_30 AC 86 ms
15,496 KB
testcase_31 AC 86 ms
15,388 KB
testcase_32 AC 86 ms
15,464 KB
testcase_33 TLE -
testcase_34 AC 80 ms
15,152 KB
testcase_35 AC 81 ms
15,244 KB
testcase_36 AC 82 ms
15,252 KB
testcase_37 AC 84 ms
15,200 KB
testcase_38 TLE -
testcase_39 TLE -
testcase_40 TLE -
testcase_41 TLE -
testcase_42 TLE -
testcase_43 TLE -
testcase_44 TLE -
testcase_45 TLE -
testcase_46 TLE -
testcase_47 TLE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:12: warning: ambiguous first argument; put parentheses or a space even after `-' operator
Syntax OK

ソースコード

diff #

N, M = gets.split.map(&:to_i)
A = gets.split.map(&:to_i)
B = gets.split.map(&:to_i)

(N * M).times do |i|
  next if A[i % N] != B[i % M]

  puts i + 1
  exit
end

puts -1
0