結果
| 問題 | 
                            No.500 階乗電卓
                             | 
                    
| コンテスト | |
| ユーザー | 
                             card_board01
                         | 
                    
| 提出日時 | 2018-09-24 16:04:25 | 
| 言語 | C  (gcc 13.3.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 345 bytes | 
| コンパイル時間 | 394 ms | 
| コンパイル使用メモリ | 29,184 KB | 
| 実行使用メモリ | 5,376 KB | 
| 最終ジャッジ日時 | 2024-09-22 04:52:09 | 
| 合計ジャッジ時間 | 935 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 1 WA * 2 | 
| other | AC * 15 WA * 5 | 
ソースコード
#include <stdio.h>
int main (void) {
    long input;
    long N = 1;
    
    scanf("%d", &input);
    
    if (input < 50) {
        for (long i = input; i >= 1; i--) {
            N =  N * i % (long)1e12;
        }
        
        printf("%012ld\n", N);
    }
    else {
        printf("000000000000\n");
    }
    
    
    
    return 0;
}
            
            
            
        
            
card_board01