結果
| 問題 | No.2953 Maximum Right Triangle |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-11-08 21:52:05 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 303 bytes |
| 記録 | |
| コンパイル時間 | 344 ms |
| コンパイル使用メモリ | 84,992 KB |
| 実行使用メモリ | 52,096 KB |
| 最終ジャッジ日時 | 2026-05-09 01:24:39 |
| 合計ジャッジ時間 | 4,047 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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)