結果

問題 No.500 階乗電卓
ユーザー card_board01
提出日時 2018-09-24 15:58:41
言語 C
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 397 bytes
コンパイル時間 148 ms
コンパイル使用メモリ 29,312 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-09-22 04:40:48
合計ジャッジ時間 2,633 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
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 input;
    long N;
    
    scanf("%d", &input);
    
    N = fuc(input);
    
    if (N < 50) {
        printf("%12ld\n", N);
    }
    else {
        printf("000000000000\n");
    }
    
    
    
    return 0;
}
0