結果
| 問題 | 
                            No.282 おもりと天秤(2)
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2016-06-14 20:07:10 | 
| 言語 | Python3  (3.13.1 + numpy 2.2.1 + scipy 1.14.1)  | 
                    
| 結果 | 
                             
                                RE
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 702 bytes | 
| コンパイル時間 | 309 ms | 
| コンパイル使用メモリ | 12,928 KB | 
| 実行使用メモリ | 28,160 KB | 
| 平均クエリ数 | 3.00 | 
| 最終ジャッジ日時 | 2024-07-16 10:26:24 | 
| 合計ジャッジ時間 | 7,251 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | RE * 24 | 
コンパイルメッセージ
Main.py:16: SyntaxWarning: "is" with 'int' literal. Did you mean "=="? if num is 0:
ソースコード
import sys
import math
def Q(nums):
    print("?", end=" ")
    for num in nums:
        print(num, end=" ")
    print()
    sys.stdout.flush()
def A(nums):
    print("!", end = " ")
    for num in nums:
        if num is 0:
            break
        print(num, end=" ")
    print()
n = int(input())
n*=2
array = [0]*n
for i in range(int(n/2)):
    array[i] = i+1
for count in range(n):
    off = ((count%2))
    Q([0] + array[off:] if off == 1 else array)
    res = list(map(str, input().split()))
    for j in range(math.ceil(n/2.0)):
        if res[j] == ">" and array[2*j+1+off] != 0:
            array[2*j+off], array[2*j+1+off] = array[2*j+1+off], array[2*j+off]
    print(array)
A(array)