結果
| 問題 |
No.420 mod2漸化式
|
| コンテスト | |
| ユーザー |
mban
|
| 提出日時 | 2016-10-12 03:41:32 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 785 bytes |
| コンパイル時間 | 3,296 ms |
| コンパイル使用メモリ | 103,808 KB |
| 実行使用メモリ | 18,048 KB |
| 最終ジャッジ日時 | 2024-11-22 02:05:02 |
| 合計ジャッジ時間 | 3,031 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 1 |
| other | AC * 4 WA * 31 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
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 = 2147483617 * 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;
}
}
mban