結果

問題 No.2124 Guess the Permutation
コンテスト
ユーザー 👑 KA37RI
提出日時 2023-10-27 08:23:57
言語 Python3
(3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
WA  
実行時間 -
コード長 275 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 302 ms
コンパイル使用メモリ 21,340 KB
実行使用メモリ 15,788 KB
平均クエリ数 373.60
最終ジャッジ日時 2026-09-04 03:09:35
合計ジャッジ時間 2,918 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 1
other WA * 9
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

n = int(input())
ans = [0] * n
print(f"? 2 {n}")
lst = n * (n + 1) // 2
ans[0] = n * (n + 1) // 2 - int(input())
sm = ans[0]
for i in range(1, n - 2):
	print(f"? {i+1} {i+2}")
	ans[i] = int(input()) - ans[i-1]
	sm += ans[i]
ans[n-1] = n * (n + 1) // 2 - sm
print("!", *ans)
	
0