結果
問題 | No.8054 ほぼ直角二等辺三角形 |
ユーザー | mikit |
提出日時 | 2019-04-01 22:59:47 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 38 ms / 2,000 ms |
コード長 | 312 bytes |
コンパイル時間 | 215 ms |
コンパイル使用メモリ | 82,260 KB |
実行使用メモリ | 52,224 KB |
最終ジャッジ日時 | 2024-11-27 03:59:51 |
合計ジャッジ時間 | 2,134 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 18 |
ソースコード
def isqrt(n): x = n y = (x + 1) // 2 while y < x: x = y y = (x + n // x) // 2 return x x = int(input()) - 1 a = [0, 3] while True: b = a[-1] + 1 c = isqrt(a[-1] ** 2 + b ** 2) if 10 ** x <= c: print(a[-1], b, c) break a += [6 * a[-1] - a[-2] + 2]