結果
問題 |
No.500 階乗電卓
|
ユーザー |
![]() |
提出日時 | 2017-04-17 20:16:45 |
言語 | Python2 (2.7.18) |
結果 |
WA
|
実行時間 | - |
コード長 | 239 bytes |
コンパイル時間 | 41 ms |
コンパイル使用メモリ | 6,784 KB |
実行使用メモリ | 6,400 KB |
最終ジャッジ日時 | 2024-07-19 05:37:32 |
合計ジャッジ時間 | 901 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 2 |
other | AC * 16 WA * 4 |
ソースコード
N = input() if N > 1000000: print "000000000000" exit(0) MOD = 1000*1000*1000*1000 ans = 1 big = False for i in range(1,N+1): ans *= i if ans > MOD: ans %= MOD big = True ans = str(ans) while len(ans) < 12: ans = '0'+ans print ans