結果
問題 |
No.2953 Maximum Right Triangle
|
ユーザー |
|
提出日時 | 2024-11-08 23:02:10 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 293 bytes |
コンパイル時間 | 353 ms |
コンパイル使用メモリ | 82,176 KB |
実行使用メモリ | 52,992 KB |
最終ジャッジ日時 | 2024-11-08 23:02:12 |
合計ジャッジ時間 | 1,094 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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)))