結果

問題 No.1713 trick or treat!
ユーザー wesoweeen
提出日時 2021-12-04 01:15:37
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 26 ms / 2,000 ms
コード長 353 bytes
コンパイル時間 159 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-07-06 07:10:45
合計ジャッジ時間 920 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
    trick, treat = map(int, input().split())
    trick_or_treat = trick | treat
    print(factorical(trick_or_treat))


def factorical(num: int) -> int:
    fact = 1
    if num == 0: 
        return 1
    else:
        while num > 1: 
            fact *= num 
            num -= 1
        return fact 


if __name__ == "__main__":
    main()
0