結果

問題 No.420 mod2漸化式
ユーザー mbanmban
提出日時 2016-10-12 03:43:00
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 54 ms / 1,000 ms
コード長 785 bytes
コンパイル時間 4,059 ms
コンパイル使用メモリ 102,776 KB
実行使用メモリ 22,780 KB
最終ジャッジ日時 2023-08-26 00:42:19
合計ジャッジ時間 4,973 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 49 ms
18,728 KB
testcase_01 AC 49 ms
22,556 KB
testcase_02 AC 50 ms
20,640 KB
testcase_03 AC 49 ms
20,868 KB
testcase_04 AC 51 ms
20,660 KB
testcase_05 AC 51 ms
22,672 KB
testcase_06 AC 51 ms
22,716 KB
testcase_07 AC 51 ms
20,764 KB
testcase_08 AC 51 ms
20,596 KB
testcase_09 AC 51 ms
22,780 KB
testcase_10 AC 51 ms
20,664 KB
testcase_11 AC 51 ms
20,676 KB
testcase_12 AC 50 ms
20,680 KB
testcase_13 AC 50 ms
20,576 KB
testcase_14 AC 52 ms
20,664 KB
testcase_15 AC 51 ms
20,556 KB
testcase_16 AC 50 ms
20,676 KB
testcase_17 AC 48 ms
20,784 KB
testcase_18 AC 50 ms
18,760 KB
testcase_19 AC 49 ms
20,664 KB
testcase_20 AC 49 ms
22,704 KB
testcase_21 AC 52 ms
22,780 KB
testcase_22 AC 52 ms
22,716 KB
testcase_23 AC 54 ms
18,616 KB
testcase_24 AC 53 ms
20,524 KB
testcase_25 AC 52 ms
20,672 KB
testcase_26 AC 51 ms
20,800 KB
testcase_27 AC 51 ms
18,604 KB
testcase_28 AC 52 ms
20,588 KB
testcase_29 AC 52 ms
20,668 KB
testcase_30 AC 52 ms
20,664 KB
testcase_31 AC 52 ms
20,668 KB
testcase_32 AC 53 ms
20,768 KB
testcase_33 AC 52 ms
22,740 KB
testcase_34 AC 50 ms
20,748 KB
testcase_35 AC 51 ms
20,688 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

class Magatro
{
    static int x = int.Parse(Console.ReadLine());
   static void Main() {
        if (x >= 32)
        {
            Console.WriteLine("0 0");
            return;
        }
        long ko = nCm(31, x);
        Console.Write(ko+" ");
        long wa;
        wa = 2147483647 * nCm(30, x - 1);
        Console.Write(wa);
        Console.WriteLine();

    }
    static long kaijou(int n)
    {
        if (n == 0)
        {
            return 1;
        }
        return n * kaijou(n - 1);
    }
   static long nCm(int n, int m)
    {
        if (m == 0) return 1;
        if (n == 0) return 0;
        return n * nCm(n - 1, m - 1) / m;
    }
 
   

}


0