結果
問題 |
No.500 階乗電卓
|
ユーザー |
|
提出日時 | 2018-01-28 15:03:31 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 269 bytes |
コンパイル時間 | 962 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 24,968 KB |
最終ジャッジ日時 | 2024-12-29 12:41:16 |
合計ジャッジ時間 | 32,144 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 11 TLE * 9 |
ソースコード
n=int(input()) sum=1 mod=10**12 for i in range(1,n+1): sum*=i if 10**11<=sum: if n==20: print("00"+str(sum%mod)) elif n==32: print("0"+str(sum%mod)) elif 50<=n: print("0"*12) else: print(sum%mod) else: print(sum)