結果

問題 No.1149 色塗りゲーム
ユーザー ああいいああいい
提出日時 2021-12-29 01:03:30
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 173 ms / 2,000 ms
コード長 283 bytes
コンパイル時間 461 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 27,744 KB
平均クエリ数 19.82
最終ジャッジ日時 2024-04-14 04:04:19
合計ジャッジ時間 9,048 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 86 ms
27,232 KB
testcase_01 AC 84 ms
27,480 KB
testcase_02 AC 85 ms
27,232 KB
testcase_03 AC 83 ms
27,488 KB
testcase_04 AC 83 ms
27,488 KB
testcase_05 AC 84 ms
27,232 KB
testcase_06 AC 85 ms
27,232 KB
testcase_07 AC 85 ms
27,232 KB
testcase_08 AC 84 ms
27,744 KB
testcase_09 AC 84 ms
27,232 KB
testcase_10 AC 85 ms
27,224 KB
testcase_11 AC 85 ms
27,616 KB
testcase_12 AC 85 ms
27,360 KB
testcase_13 AC 86 ms
27,360 KB
testcase_14 AC 86 ms
27,616 KB
testcase_15 AC 86 ms
27,744 KB
testcase_16 AC 90 ms
27,360 KB
testcase_17 AC 87 ms
27,744 KB
testcase_18 AC 86 ms
27,488 KB
testcase_19 AC 86 ms
27,744 KB
testcase_20 AC 87 ms
27,360 KB
testcase_21 AC 87 ms
27,616 KB
testcase_22 AC 87 ms
27,488 KB
testcase_23 AC 88 ms
27,360 KB
testcase_24 AC 88 ms
26,976 KB
testcase_25 AC 89 ms
27,488 KB
testcase_26 AC 90 ms
27,608 KB
testcase_27 AC 90 ms
27,240 KB
testcase_28 AC 89 ms
27,616 KB
testcase_29 AC 92 ms
27,352 KB
testcase_30 AC 136 ms
27,232 KB
testcase_31 AC 133 ms
27,232 KB
testcase_32 AC 137 ms
27,232 KB
testcase_33 AC 137 ms
27,224 KB
testcase_34 AC 143 ms
26,976 KB
testcase_35 AC 135 ms
27,488 KB
testcase_36 AC 148 ms
27,488 KB
testcase_37 AC 148 ms
27,488 KB
testcase_38 AC 143 ms
26,976 KB
testcase_39 AC 149 ms
27,360 KB
testcase_40 AC 160 ms
27,568 KB
testcase_41 AC 152 ms
27,360 KB
testcase_42 AC 149 ms
27,360 KB
testcase_43 AC 146 ms
27,232 KB
testcase_44 AC 161 ms
27,360 KB
testcase_45 AC 159 ms
27,616 KB
testcase_46 AC 160 ms
27,104 KB
testcase_47 AC 169 ms
27,360 KB
testcase_48 AC 167 ms
27,232 KB
testcase_49 AC 173 ms
27,360 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())

if N & 1:
    n = N // 2 + 1
    print(1,n)
else:
    n = N // 2
    print(2,n)

while True:
    t = int(input())
    if t == 0:
        break
    k,x = map(int,input().split())
    
    if k == 1:
        print(1,N + 1 - x)
    else:
        print(2,N + 1 - x - 1)
0