結果
| 問題 | No.500 階乗電卓 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-02-03 01:00:01 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 321 bytes |
| 記録 | |
| コンパイル時間 | 171 ms |
| コンパイル使用メモリ | 12,800 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-12-31 08:25:01 |
| 合計ジャッジ時間 | 1,787 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 18 WA * 2 |
ソースコード
def format(n):
string = str(n)
if len(string) != 12 and string[0] == "0":
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:
break
print(format(answer))
main()