結果
問題 | No.500 階乗電卓 |
ユーザー |
![]() |
提出日時 | 2017-09-08 22:48:32 |
言語 | C (gcc 13.3.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 453 bytes |
コンパイル時間 | 303 ms |
コンパイル使用メモリ | 31,744 KB |
実行使用メモリ | 12,288 KB |
最終ジャッジ日時 | 2024-11-07 05:48:22 |
合計ジャッジ時間 | 6,677 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | -- * 3 |
other | TLE * 1 -- * 19 |
ソースコード
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #define ARRAY_NUM 100000 void factorial_calc(); // No.500 void delete_7(); void check_575(); //void jenga(); // //void poker(); int main(void) { factorial_calc(); return 0; } void factorial_calc() { int n=0, sum=0; scanf("%d", &n); sum = n; while (n--) { // n回ループ if(n == 0){ break; } sum *= n; } printf("%d\n", sum % (int) pow(10, 12)); }