結果
| 問題 |
No.2493 K-th in L2 with L1
|
| ユーザー |
|
| 提出日時 | 2024-04-16 20:23:22 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 42 ms / 2,000 ms |
| コード長 | 255 bytes |
| コンパイル時間 | 249 ms |
| コンパイル使用メモリ | 82,140 KB |
| 実行使用メモリ | 52,608 KB |
| 最終ジャッジ日時 | 2024-10-07 23:10:44 |
| 合計ジャッジ時間 | 1,319 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 4 |
ソースコード
for _ in range(Q := int(input())):
D, K = map(int, input().split())
if max(1, 4*D) < K:
print("No")
continue
print("Yes")
if D%2 == 0:
print(D//2 + (K+3)//8, D//2 - (K+3)//8)
else:
print((D+1)//2 + (K-1)//8, D//2 - (K-1)//8)