結果
| 問題 |
No.3301 Make Right Triangle
|
| コンテスト | |
| ユーザー |
Cecil
|
| 提出日時 | 2025-10-05 15:04:52 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
MLE
|
| 実行時間 | - |
| コード長 | 433 bytes |
| コンパイル時間 | 229 ms |
| コンパイル使用メモリ | 82,224 KB |
| 実行使用メモリ | 651,108 KB |
| 最終ジャッジ日時 | 2025-10-05 15:05:00 |
| 合計ジャッジ時間 | 7,180 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 1 |
| other | MLE * 1 -- * 8 |
ソースコード
from collections import defaultdict as dd
from math import gcd
dic = dd(list)
for n in range(1,5*10**4):
for m in range(n+1,5*10**4,2):
if n%2==m%2:
continue
if gcd(n,m)!=1:
continue
a = m*m-n*n
b = 2*m*n
c = m*m+n*n
dic[a] = [b,c]
dic[b] = [a,c]
dic[c] = [a,b]
T = int(input())
for _ in range(T):
L = int(input())
print(L,*dic[L])
Cecil