結果

問題 No.8054 ほぼ直角二等辺三角形
コンテスト
ユーザー knshnb
提出日時 2019-04-01 23:32:12
言語 Python3
(3.14.3 + numpy 2.4.4 + scipy 1.17.1)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
AC  
実行時間 98 ms / 2,000 ms
コード長 474 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 468 ms
コンパイル使用メモリ 20,960 KB
実行使用メモリ 15,488 KB
最終ジャッジ日時 2026-05-21 11:30:05
合計ジャッジ時間 5,341 ms
ジャッジサーバーID
(参考情報)
judge1_1 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 18
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import math
s = "3 20 119 4059 23660 137903 4684659 27304196 159140519 5406093003 31509019100 183648021599 1070379110496 36361380737780 211929657785303 1235216565974040 41961001862379596 244566641436218639"
s = list(map(int, s.split()))

X = int(input())
a = s[X - 1]
b = a + 1
tmp = a * a + b * b
t = int(math.sqrt(tmp))
if t * t == tmp:
    print(a, b, t)
    exit(0)
for c in range(t - 100, t + 100):
    if c * c == tmp:
        break
assert(c * c == tmp)
print(a, b, c)
0