結果
問題 | No.64 XORフィボナッチ数列 |
ユーザー | yassu0320 |
提出日時 | 2023-07-08 23:27:33 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 242 ms / 5,000 ms |
コード長 | 1,647 bytes |
コンパイル時間 | 580 ms |
コンパイル使用メモリ | 86,804 KB |
実行使用メモリ | 84,996 KB |
最終ジャッジ日時 | 2023-09-30 01:51:51 |
合計ジャッジ時間 | 5,159 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 230 ms
84,816 KB |
testcase_01 | AC | 230 ms
84,392 KB |
testcase_02 | AC | 231 ms
84,880 KB |
testcase_03 | AC | 228 ms
84,876 KB |
testcase_04 | AC | 232 ms
84,876 KB |
testcase_05 | AC | 230 ms
84,976 KB |
testcase_06 | AC | 229 ms
84,820 KB |
testcase_07 | AC | 230 ms
84,792 KB |
testcase_08 | AC | 230 ms
84,596 KB |
testcase_09 | AC | 234 ms
84,780 KB |
testcase_10 | AC | 237 ms
84,836 KB |
testcase_11 | AC | 240 ms
84,924 KB |
testcase_12 | AC | 242 ms
84,996 KB |
testcase_13 | AC | 239 ms
84,840 KB |
ソースコード
#!/usr/bin/env pypy3 from inspect import currentframe from pprint import pprint from string import ascii_lowercase as letter from sys import setrecursionlimit, stderr, stdin from typing import Dict, Generic, Iterable, Iterator, List, Optional, Set, TypeVar, Union try: import pypyjit pypyjit.set_param('max_unroll_recursion=-1') except ModuleNotFoundError: ... INF: int = (1 << 62) - 1 MOD1000000007 = 10**9 + 7 MOD998244353 = 998244353 setrecursionlimit(500_000) # 5*10**5 readline = stdin.readline input = lambda: stdin.readline().rstrip('\r\n') def copy2d(a: list) -> list: return [[y for y in x] for x in a] def copy3d(a: list) -> list: return [[[z for z in y] for y in x] for x in a] def flattern2d(mat: list) -> list: return [x for a in mat for x in a] IS_DEVELOPMENT = None def debug(*a) -> None: global IS_DEVELOPMENT if IS_DEVELOPMENT is None: IS_DEVELOPMENT = __file__.endswith('/main.py') if not IS_DEVELOPMENT: return line_no = currentframe().f_back.f_lineno print(f"L{line_no}:", *a, file=stderr) def inputs(type_=int, one_word=False) -> list: in_ = input() if one_word: ins = list(in_) else: ins = in_.split() if isinstance(type_, Iterable): return [t(x) for t, x in zip(type_, ins)] else: return list(map(type_, ins)) def inputi() -> int: return int(readline()) yn = ['no', 'yes'] Yn = ['No', 'Yes'] YN = ['NO', 'YES'] # start coding f0, f1, n = inputs() # f0, f1, n = 88, 79, 2 n %= 3 # print(n) # debug(f0, f1) if n == 0: print(f0) elif n == 1: print(f1) else: print(f0 ^ f1)