結果

問題 No.790 ちきんの括弧並べ
ユーザー ixTL255ixTL255
提出日時 2019-09-10 22:47:29
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 55 ms / 2,000 ms
コード長 338 bytes
コンパイル時間 1,994 ms
コンパイル使用メモリ 101,776 KB
実行使用メモリ 22,760 KB
最終ジャッジ日時 2023-09-15 13:17:42
合計ジャッジ時間 4,299 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 54 ms
20,708 KB
testcase_01 AC 54 ms
20,584 KB
testcase_02 AC 54 ms
22,664 KB
testcase_03 AC 53 ms
20,876 KB
testcase_04 AC 54 ms
20,632 KB
testcase_05 AC 54 ms
22,628 KB
testcase_06 AC 54 ms
22,644 KB
testcase_07 AC 55 ms
20,704 KB
testcase_08 AC 55 ms
20,820 KB
testcase_09 AC 54 ms
20,800 KB
testcase_10 AC 54 ms
20,712 KB
testcase_11 AC 55 ms
20,716 KB
testcase_12 AC 55 ms
22,760 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

public class Yuki790
{
	public static void Main()
	{
		var n = int.Parse(Console.ReadLine());
		
		var a = 1L;
		for(var i = 0; i < n - 1; ++i) a *= (2 * n - i);
		var b = Factorial(n);

		Console.WriteLine(a / b);
	}
	
	private static long Factorial(int n)
	{
		if(n == 0) return 1L;
		
		return n * Factorial(n - 1);
	}
}
0