結果
問題 |
No.2124 Guess the Permutation
|
ユーザー |
![]() |
提出日時 | 2022-11-18 21:26:53 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 305 bytes |
コンパイル時間 | 187 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 40,812 KB |
最終ジャッジ日時 | 2024-09-20 01:52:23 |
合計ジャッジ時間 | 6,391 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | TLE * 1 |
other | -- * 9 |
ソースコード
from sys import stdin input = stdin.buffer.read 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)