結果

問題 No.2124 Guess the Permutation
ユーザー Kude
提出日時 2022-11-18 21:23:43
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 255 bytes
コンパイル時間 180 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 82,008 KB
平均クエリ数 1.00
最終ジャッジ日時 2024-09-20 01:49:12
合計ジャッジ時間 1,783 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
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