結果

問題 No.1459 スマホを落としたいだけなのに
コンテスト
ユーザー roaris
提出日時 2021-03-31 22:58:50
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 30 ms / 2,000 ms
コード長 337 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 198 ms
コンパイル使用メモリ 85,552 KB
実行使用メモリ 61,028 KB
最終ジャッジ日時 2026-05-26 04:53:36
合計ジャッジ時間 2,381 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 6
other AC * 30
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import sys
input = sys.stdin.readline
from collections import *

def f(x):
    if x==0:
        return 0
    
    res = 10**18
    
    for i in range(1, x+1):
        res = min(res, max(i, 1+f(x-i)))
    
    return res

N = int(input())
now = 0

for i in range(10**5):
    if N<=now+i:
        print(i)
        exit()
    
    now += i
0