結果
問題 | No.1544 [Cherry 2nd Tune C] Synchroscope |
ユーザー |
👑 |
提出日時 | 2021-06-13 13:35:13 |
言語 | Lua (LuaJit 2.1.1734355927) |
結果 |
AC
|
実行時間 | 281 ms / 2,000 ms |
コード長 | 317 bytes |
コンパイル時間 | 382 ms |
コンパイル使用メモリ | 6,944 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-12-22 23:56:30 |
合計ジャッジ時間 | 5,108 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 48 |
ソースコード
local n, m = io.read("*n", "*n")local a, b = {}, {}for i = 1, n doa[i] = io.read("*n")endfor i = 1, m dob[i] = io.read("*n")endfor i = 1, n * m dolocal ai = i % nif ai == 0 then ai = n endlocal bi = i % mif bi == 0 then bi = m endif a[ai] == b[bi] then print(i) os.exit() endendprint(-1)