結果

問題 No.634 硬貨の枚数1
ユーザー H3PO4
提出日時 2020-10-17 17:18:44
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 183 bytes
コンパイル時間 74 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-07-21 02:53:29
合計ジャッジ時間 3,965 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 9 WA * 66
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import floor

trinv = lambda x: floor((1 + (1 + 8 * x) ** .5) / 2)

N = int(input())
ans = 0
while N > 0:
    t = trinv(N)
    N -= t * (t - 1) // 2
    ans += 1
print(ans)
0