結果
| 問題 |
No.500 階乗電卓
|
| コンテスト | |
| ユーザー |
Gmorning084
|
| 提出日時 | 2017-06-10 13:17:50 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 271 bytes |
| コンパイル時間 | 268 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-09-24 15:31:35 |
| 合計ジャッジ時間 | 1,634 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 18 WA * 2 |
ソースコード
n = int(input())
ans = n
if n == 1:print(1)
if n == 2:print(2)
while True:
ans = (ans * (n-1))%(10**13)
n -= 1
if n == 2:
s = str(ans)
print(s[-12:])
break
elif ans == 0:
print("000000000000")
break
Gmorning084