結果
問題 | No.500 階乗電卓 |
ユーザー | jokin_tokei |
提出日時 | 2017-09-08 22:48:32 |
言語 | C (gcc 12.3.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 453 bytes |
コンパイル時間 | 278 ms |
コンパイル使用メモリ | 32,768 KB |
実行使用メモリ | 12,160 KB |
最終ジャッジ日時 | 2024-04-24 20:48:33 |
合計ジャッジ時間 | 6,729 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | TLE | - |
testcase_01 | -- | - |
testcase_02 | -- | - |
testcase_03 | -- | - |
testcase_04 | -- | - |
testcase_05 | -- | - |
testcase_06 | -- | - |
testcase_07 | -- | - |
testcase_08 | -- | - |
testcase_09 | -- | - |
testcase_10 | -- | - |
testcase_11 | -- | - |
testcase_12 | -- | - |
testcase_13 | -- | - |
testcase_14 | -- | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
testcase_20 | -- | - |
testcase_21 | -- | - |
testcase_22 | -- | - |
ソースコード
#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)); }