提出 #29019824


ソースコード 拡げる

from functools import lru_cache

MOD = 998244353

@lru_cache
def f(X):
    if X <= 4:
        return X
    X1 = X // 2
    X2 = (X + 1) // 2
    return f(X1) * f(X2) % MOD

X = int(input())
print(f(X))

提出情報

提出日時
問題 A - Floor, Ceil - Decomposition
ユーザ maspy
言語 Python (3.8.2)
得点 300
コード長 216 Byte
結果 AC
実行時間 27 ms
メモリ 9120 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 300 / 300
結果
AC × 3
AC × 22
セット名 テストケース
Sample 01_sample_01.txt, 01_sample_02.txt, 01_sample_03.txt
All 01_sample_01.txt, 01_sample_02.txt, 01_sample_03.txt, 02_small_01.txt, 02_small_02.txt, 02_small_03.txt, 02_small_04.txt, 02_small_05.txt, 02_small_06.txt, 02_small_07.txt, 02_small_08.txt, 02_small_09.txt, 02_small_10.txt, 03_rand_01.txt, 03_rand_02.txt, 03_rand_03.txt, 03_rand_04.txt, 03_rand_05.txt, 04_handmade_01.txt, 04_handmade_02.txt, 04_handmade_03.txt, 04_handmade_04.txt
ケース名 結果 実行時間 メモリ
01_sample_01.txt AC 27 ms 8988 KiB
01_sample_02.txt AC 24 ms 8992 KiB
01_sample_03.txt AC 20 ms 9096 KiB
02_small_01.txt AC 25 ms 9084 KiB
02_small_02.txt AC 19 ms 9008 KiB
02_small_03.txt AC 20 ms 9056 KiB
02_small_04.txt AC 21 ms 9024 KiB
02_small_05.txt AC 19 ms 9060 KiB
02_small_06.txt AC 19 ms 9004 KiB
02_small_07.txt AC 25 ms 9020 KiB
02_small_08.txt AC 21 ms 9060 KiB
02_small_09.txt AC 25 ms 8996 KiB
02_small_10.txt AC 20 ms 9024 KiB
03_rand_01.txt AC 19 ms 9048 KiB
03_rand_02.txt AC 20 ms 9060 KiB
03_rand_03.txt AC 21 ms 9060 KiB
03_rand_04.txt AC 26 ms 9032 KiB
03_rand_05.txt AC 21 ms 9040 KiB
04_handmade_01.txt AC 24 ms 9096 KiB
04_handmade_02.txt AC 20 ms 9032 KiB
04_handmade_03.txt AC 20 ms 9112 KiB
04_handmade_04.txt AC 19 ms 9120 KiB