結果
問題 | No.2493 K-th in L2 with L1 |
ユーザー | nikoro256 |
提出日時 | 2023-10-06 21:47:54 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 522 bytes |
コンパイル時間 | 346 ms |
コンパイル使用メモリ | 87,304 KB |
実行使用メモリ | 76,276 KB |
最終ジャッジ日時 | 2023-10-06 21:47:56 |
合計ジャッジ時間 | 1,982 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | WA | - |
testcase_02 | WA | - |
testcase_03 | WA | - |
testcase_04 | WA | - |
ソースコード
Q=int(input()) for _ in range(Q): D,K=map(int,input().split()) lis=[] if D==0: if K==1: print('Yes') print(0,0) else: print('No') continue for i in range(D+1): lis.append([i**2+(D-i)**2,i,D-i]) lis.append([i**2+(D-i)**2,-i,D-i]) lis.append([i**2+(D-i)**2,i,-D+i]) lis.append([i**2+(D-i)**2,-i,-D+i]) lis.sort() if len(lis)>=K: print('Yes') print(*lis[K-1][1:]) else: print('No')