結果

問題 No.3301 Make Right Triangle
ユーザー sepa38
提出日時 2024-08-01 17:55:04
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 373 ms / 2,000 ms
コード長 189 bytes
コンパイル時間 305 ms
コンパイル使用メモリ 82,456 KB
実行使用メモリ 77,552 KB
最終ジャッジ日時 2025-10-05 13:00:24
合計ジャッジ時間 7,962 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

for _ in range(int(input())):
	l = int(input())
	if l % 2:
		print(l, (l**2-1)//2, (l**2+1)//2)
	elif l % 4:
		print(l, (l//2)**2-1, (l//2)**2+1)
	else:
		print(l, (l**2)//4-1, (l**2)//4+1)
0