Wrong Answer
Code
'''CODED BY mahmudulsakib2019
DATE:-09/03/2024; TIME:-19:27 PM
BANGALDESH , SYLHET'''
import math
for i in range(int(input())):
p=[]
n=int(input())
for j in range(1,1001):
c= n**2 + j**2
C=math.sqrt(c)
if(C%1==0):
sum = int(C+n+j)
p.append(sum)
if(len(p)==0):
print(-1)
else:
print(max(p))
Information
- Submit By
- Type
- Submission
- Problem
- P1027 Right triangle
- Language
- Python 3 (Python 3.12.3)
- Submit At
- 2024-03-12 13:25:22
- Judged At
- 2024-11-11 03:40:57
- Judged By
- Score
- 5
- Total Time
- 19ms
- Peak Memory
- 3.09 MiB