結果
| 問題 |
No.2953 Maximum Right Triangle
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-11-08 21:52:05 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 303 bytes |
| コンパイル時間 | 213 ms |
| コンパイル使用メモリ | 82,432 KB |
| 実行使用メモリ | 80,896 KB |
| 最終ジャッジ日時 | 2024-11-08 21:52:18 |
| 合計ジャッジ時間 | 3,784 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | WA * 1 TLE * 1 -- * 4 |
ソースコード
t=int(input())
for _ in range(t):
d,a,b=map(int,input().split())
ans=-1
now=a-1
while now>=0:
y=-a/b*now+(b+a**2/b)
if y>d:
break
if y.is_integer():
ans=a**2+b**2
now-=1
if ans==-1:
print(0)
else:
print(ans)