結果

問題 No.2124 Guess the Permutation
ユーザー Kude
提出日時 2022-11-18 21:24:08
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
RE  
実行時間 -
コード長 255 bytes
コンパイル時間 77 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 27,736 KB
平均クエリ数 1.00
最終ジャッジ日時 2024-09-20 01:49:28
合計ジャッジ時間 1,339 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample RE * 1
other RE * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

def ask(x):
    print(f'? 1 {x + 1}')
    return int(input())

def answer(d):
    print('!', *d)

n = int(input())
ans = []
sm = 0
for i in range(n - 1):
    x = ask(i) - sm
    ans.append(x)
    sm += x
x = n * (n + 1) // 2 - sm
ans.append(x)
answer(ans)
0