結果

問題 No.1149 色塗りゲーム
ユーザー MasKoaTSMasKoaTS
提出日時 2023-09-18 14:34:36
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 190 ms / 2,000 ms
コード長 471 bytes
コンパイル時間 296 ms
コンパイル使用メモリ 87,152 KB
実行使用メモリ 87,720 KB
平均クエリ数 19.82
最終ジャッジ日時 2023-09-18 14:34:47
合計ジャッジ時間 10,925 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 117 ms
86,696 KB
testcase_01 AC 119 ms
87,364 KB
testcase_02 AC 116 ms
86,880 KB
testcase_03 AC 116 ms
86,896 KB
testcase_04 AC 114 ms
87,356 KB
testcase_05 AC 115 ms
87,300 KB
testcase_06 AC 114 ms
87,152 KB
testcase_07 AC 114 ms
87,420 KB
testcase_08 AC 115 ms
86,916 KB
testcase_09 AC 114 ms
87,116 KB
testcase_10 AC 114 ms
86,724 KB
testcase_11 AC 117 ms
86,908 KB
testcase_12 AC 117 ms
86,976 KB
testcase_13 AC 116 ms
87,568 KB
testcase_14 AC 116 ms
86,524 KB
testcase_15 AC 116 ms
87,040 KB
testcase_16 AC 116 ms
86,968 KB
testcase_17 AC 118 ms
87,296 KB
testcase_18 AC 118 ms
86,992 KB
testcase_19 AC 119 ms
86,776 KB
testcase_20 AC 119 ms
86,608 KB
testcase_21 AC 117 ms
87,344 KB
testcase_22 AC 119 ms
87,096 KB
testcase_23 AC 118 ms
87,352 KB
testcase_24 AC 119 ms
87,172 KB
testcase_25 AC 120 ms
87,308 KB
testcase_26 AC 117 ms
86,664 KB
testcase_27 AC 120 ms
87,704 KB
testcase_28 AC 120 ms
87,108 KB
testcase_29 AC 122 ms
87,720 KB
testcase_30 AC 162 ms
86,904 KB
testcase_31 AC 155 ms
87,228 KB
testcase_32 AC 155 ms
87,172 KB
testcase_33 AC 160 ms
87,484 KB
testcase_34 AC 165 ms
87,128 KB
testcase_35 AC 156 ms
87,328 KB
testcase_36 AC 167 ms
87,012 KB
testcase_37 AC 167 ms
86,988 KB
testcase_38 AC 161 ms
87,200 KB
testcase_39 AC 170 ms
87,168 KB
testcase_40 AC 174 ms
87,396 KB
testcase_41 AC 172 ms
87,128 KB
testcase_42 AC 167 ms
86,956 KB
testcase_43 AC 169 ms
87,360 KB
testcase_44 AC 179 ms
87,384 KB
testcase_45 AC 179 ms
87,012 KB
testcase_46 AC 184 ms
86,920 KB
testcase_47 AC 187 ms
86,844 KB
testcase_48 AC 189 ms
87,092 KB
testcase_49 AC 190 ms
87,192 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())

if(n & 1):
    print(*[1, n // 2 + 1])
else:
    print(*[2, n // 2])

while(int(input()) not in [0, 1]):
    k, x = map(int, input().split())
    if(n & 1 and k == 1):
        m = n // 2 + 1
        print(*[1, x + (m - x) * 2])
    elif(n & 1):
        m = n // 2 + 1
        print(*[2, x + (m - x) * 2 - 1])
    elif(k == 1):
        m = n // 2
        print(*[1, x + (m - x) * 2 + 1])
    else:
        m = n // 2
        print(*[2, x + (m - x) * 2])
0