結果
問題 |
No.2953 Maximum Right Triangle
|
ユーザー |
|
提出日時 | 2024-11-08 23:04:07 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 295 bytes |
コンパイル時間 | 211 ms |
コンパイル使用メモリ | 82,560 KB |
実行使用メモリ | 52,992 KB |
最終ジャッジ日時 | 2024-11-08 23:04:32 |
合計ジャッジ時間 | 1,065 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 2 WA * 4 |
ソースコード
T=int(input()) for _ in range(T): D,x,y=map(int,input().split()) if x==0: print(D*y) continue if y==0: print(D*x) continue if x+y>D: print(0) continue if x>=y: k=int(min((D-y)//x,x//y)) print(int(k*(x**2+y**2))) else: k=int(min((D-x)//y,y//x)) print(int(k*(x**2+y**2)))