Wrong Answer
Code
'''CODED BY mahmudulsakib2019
DATE:-13/03/2024; TIME:-19:31 PM
BANGALDESH , SYLHET'''
import math
for i in range(int(input())):
p=[]
n=int(input())
for j in range(1,1001):
c= (n*n) + (j*j)
C=math.sqrt(c)
if(C%1==0):
perimeter = int(C+n+j)
p.append(perimeter)
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:31:42
- Judged At
- 2024-11-11 03:40:57
- Judged By
- Score
- 5
- Total Time
- 30ms
- Peak Memory
- 3.133 MiB