結果
| 問題 |
No.2828 Remainder Game
|
| コンテスト | |
| ユーザー |
naut3
|
| 提出日時 | 2024-08-02 22:05:21 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 670 bytes |
| コンパイル時間 | 274 ms |
| コンパイル使用メモリ | 12,800 KB |
| 実行使用メモリ | 28,360 KB |
| 平均クエリ数 | 1.00 |
| 最終ジャッジ日時 | 2024-08-02 22:05:25 |
| 合計ジャッジ時間 | 4,100 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | RE * 20 |
ソースコード
import random
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
rng = [i for i in range(1, p)]
for i in random.shuffle(rng):
print(p, 1, flush=True)
print(i, flush=True)
C = int(input())
R[j] += C * i
R[j] %= p
cnt += C
if cnt == 5:
break
a = 0
for r in range(2 * 3 * 5 * 7 * 11 * 13):
isok = True
for i in range(6):
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)
naut3