結果
問題 | No.1149 色塗りゲーム |
ユーザー |
|
提出日時 | 2022-11-20 11:08:42 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 193 ms / 2,000 ms |
コード長 | 459 bytes |
コンパイル時間 | 253 ms |
コンパイル使用メモリ | 81,924 KB |
実行使用メモリ | 70,360 KB |
平均クエリ数 | 19.88 |
最終ジャッジ日時 | 2024-09-21 12:05:04 |
合計ジャッジ時間 | 9,984 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 50 |
ソースコード
N = int(input())if N <= 2:print(N, 1)t = int(input())exit(0)if N % 2 == 1:# 真ん中の一つを塗るx = N // 2 + 1print(1, x)up_ind = xelse:# 真ん中の2つを塗るx = N // 2print(2, x)up_ind = x + 1while True:t = int(input())if t < 2:exit(0)k,x = map(int,input().split())if x < up_ind:print(k, x + up_ind)else:print(k, x - up_ind)