結果

問題 No.500 階乗電卓
ユーザー card_board01
提出日時 2018-09-24 15:55:01
言語 C
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 385 bytes
コンパイル時間 107 ms
コンパイル使用メモリ 29,568 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-09-22 04:35:50
合計ジャッジ時間 2,502 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 2
other AC * 2 WA * 18
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>

int fuc(int n) {
    if (n > 1) {
        return n * fuc(n - 1) % 1000000000000;
    }
    else if (n == 1){
        return 1;
    }
}


int main (void) {
    int N, input;
    
    scanf("%d", &input);
    
    N = fuc(input);
    
    if (N < 50) {
        printf("%d\n", N);
    }
    else {
        printf("000000000000\n");
    }
    
    
    
    return 0;
}
0