結果
| 問題 |
No.44 DPなすごろく
|
| ユーザー |
yassu0320
|
| 提出日時 | 2021-07-11 16:20:54 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 72 ms / 5,000 ms |
| コード長 | 845 bytes |
| コンパイル時間 | 182 ms |
| コンパイル使用メモリ | 82,432 KB |
| 実行使用メモリ | 67,584 KB |
| 最終ジャッジ日時 | 2024-07-02 03:06:34 |
| 合計ジャッジ時間 | 3,084 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 20 |
ソースコード
#!/usr/bin/env python3
from sys import setrecursionlimit, stdin
from typing import Dict, Iterable, Set
INF: int = 2**62
MOD: int = 10**9 + 7
setrecursionlimit(10**6)
def inputs(type_=int):
ins = input().split(' ')
ins = [x for x in ins if x != '']
if isinstance(type_, Iterable):
return [t(x) for t, x in zip(type_, ins)]
else:
return list(map(type_, ins))
def input_(type_=int):
a, = inputs(type_)
return a
inputi = input_
def inputstr():
return input_(str)
# b/aの切り上げ
def ceil(b, a):
return (a + b - 1) // a
def answer(res) -> None:
print(res)
exit()
def compute():
return
def fib(n):
a, b = 0, 1
for _ in range(n):
a, b = b, a + b
return a
def main():
n = inputi()
print(fib(n + 1))
if __name__ == '__main__':
main()
yassu0320