結果
問題 |
No.500 階乗電卓
|
ユーザー |
|
提出日時 | 2018-02-03 01:02:48 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 321 bytes |
コンパイル時間 | 259 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-12-31 08:25:09 |
合計ジャッジ時間 | 1,852 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 18 WA * 2 |
ソースコード
def format(n): string = str(n) if len(string) != 12: return ("0"*(12-len(string)) + string) else: return string def main(): N = int(input()) answer = 1 for i in range(1, N+1): answer = (answer * i) % 10**12 if answer == 0: print(format(answer)) return print(answer) main()