結果

問題 No.2124 Guess the Permutation
ユーザー KudeKude
提出日時 2022-11-18 21:24:08
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 255 bytes
コンパイル時間 216 ms
コンパイル使用メモリ 11,752 KB
実行使用メモリ 26,436 KB
平均クエリ数 1.00
最終ジャッジ日時 2023-10-20 06:11:03
合計ジャッジ時間 1,671 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
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 -
権限があれば一括ダウンロードができます

ソースコード

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