結果
| 問題 | 
                            No.420 mod2漸化式
                             | 
                    
| コンテスト | |
| ユーザー | 
                             bayashiko_r
                         | 
                    
| 提出日時 | 2019-01-08 02:07:57 | 
| 言語 | C#(csc)  (csc 3.9.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 601 bytes | 
| コンパイル時間 | 2,093 ms | 
| コンパイル使用メモリ | 109,160 KB | 
| 実行使用メモリ | 1,649,928 KB | 
| 最終ジャッジ日時 | 2024-11-24 00:32:56 | 
| 合計ジャッジ時間 | 8,068 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | WA * 1 | 
| other | WA * 31 TLE * 3 MLE * 1 | 
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
class Program {
    static void Main(string[] args) {
        //入力
        ulong x = ulong.Parse(Console.ReadLine());
        //出力
        if (x == 0) {
            Console.WriteLine(0);
            Console.WriteLine(0);
        } else {
            Console.WriteLine(Factorial(31) / (Factorial(31 - x) * Factorial(x)));
            Console.WriteLine(2147483647 * Factorial(33) / (Factorial(30 - x) * Factorial(x - 1)));
        }
        ulong Factorial(ulong n) {
            if (n == 0)
                return 1L;
            return n * Factorial(n - 1);
        }
    }
}
            
            
            
        
            
bayashiko_r