結果
問題 |
No.2493 K-th in L2 with L1
|
ユーザー |
|
提出日時 | 2023-10-06 22:07:02 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 589 bytes |
コンパイル時間 | 285 ms |
コンパイル使用メモリ | 82,304 KB |
実行使用メモリ | 53,120 KB |
最終ジャッジ日時 | 2024-07-26 16:11:22 |
合計ジャッジ時間 | 1,437 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 1 WA * 3 |
ソースコード
Q = int(input()) for q in range(Q): D, K = map(int, input().split()) if D == 0: if K == 1: print("Yes") print(0, 0) else: print("No") continue if D * 4 < K: print("No") continue K -= 1 if D % 2 == 0: if K <= 4: temp = 0 else: temp = ((K - 4) // 8) + 1 print("Yes") print((D // 2) + temp, (D // 2) - temp) elif D % 2 == 1: temp = K // 8 print("Yes") print(D - ((D - 1) - temp), ((D - 1) - temp))