結果

問題 No.2124 Guess the Permutation
ユーザー pluto77pluto77
提出日時 2023-04-26 11:06:01
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 100 ms / 2,000 ms
コード長 265 bytes
コンパイル時間 160 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 27,512 KB
平均クエリ数 374.60
最終ジャッジ日時 2024-04-27 15:53:06
合計ジャッジ時間 2,140 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 62 ms
26,952 KB
testcase_01 AC 54 ms
27,480 KB
testcase_02 AC 58 ms
27,480 KB
testcase_03 AC 58 ms
27,096 KB
testcase_04 AC 55 ms
27,352 KB
testcase_05 AC 57 ms
27,352 KB
testcase_06 AC 77 ms
27,352 KB
testcase_07 AC 96 ms
27,224 KB
testcase_08 AC 96 ms
27,512 KB
testcase_09 AC 100 ms
27,352 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())

sm = sum(range(N + 1))

print('?', 2, N)
start = sm - int(input())

lis = [start]
prev = start
l = 1
for r in range(2, N):
    print('?', l, r)
    S = int(input())
    lis.append(S - prev)
    prev = S
lis.append(sm - sum(lis))

print('!', *lis)
0