結果
| 問題 | No.786 京都大学の過去問 |
| コンテスト | |
| ユーザー |
yassu0320
|
| 提出日時 | 2021-07-11 15:42:57 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 71 ms / 2,000 ms |
| コード長 | 845 bytes |
| 記録 | |
| コンパイル時間 | 762 ms |
| コンパイル使用メモリ | 82,092 KB |
| 実行使用メモリ | 67,200 KB |
| 最終ジャッジ日時 | 2024-07-02 03:05:35 |
| 合計ジャッジ時間 | 1,032 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 5 |
ソースコード
#!/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