結果

問題 No.2828 Remainder Game
ユーザー naut3naut3
提出日時 2024-08-02 22:00:24
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 609 bytes
コンパイル時間 90 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 27,864 KB
平均クエリ数 62.00
最終ジャッジ日時 2024-08-02 22:00:28
合計ジャッジ時間 3,496 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 RE -
testcase_03 RE -
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 RE -
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 RE -
testcase_17 RE -
testcase_18 RE -
testcase_19 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())

P = [2, 3, 5, 7, 11, 13]
R = [0, 0, 0, 0, 0, 0]

for (j, p) in enumerate(P):
    cnt = 0

    for i in range(1, p):
        print(p, 1, flush=True)
        print(i, flush=True)

        C = int(input())
        R[j] += C * i
        R[j] %= p

        cnt += C

        if C == 5:
            break

a = 0

for r in range(2 * 3 * 5 * 7 * 11 * 13):
    isok = True

    for i in range(5):
        p = P[i]
        q = R[i]

        if r % p != q:
            isok = False

    if isok:
        a = r
        break

# a, a + 2 * 3 * 5 * 7 * 13 のどっちか
print(0, 1, "\n", a, flush=True)
0