結果
問題 |
No.500 階乗電卓
|
ユーザー |
|
提出日時 | 2018-02-03 01:02:28 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
OLE
|
実行時間 | - |
コード長 | 308 bytes |
コンパイル時間 | 353 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 21,248 KB |
最終ジャッジ日時 | 2024-12-31 08:26:05 |
合計ジャッジ時間 | 31,997 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 7 WA * 4 OLE * 9 |
ソースコード
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)) print(answer) main()