結果

問題 No.242 ビンゴゲーム
ユーザー nuwasoginuwasogi
提出日時 2015-12-02 15:14:20
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 61 ms / 2,000 ms
コード長 1,238 bytes
コンパイル時間 2,593 ms
コンパイル使用メモリ 104,748 KB
実行使用メモリ 24,404 KB
最終ジャッジ日時 2023-10-12 08:54:35
合計ジャッジ時間 4,142 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 59 ms
22,792 KB
testcase_01 AC 59 ms
22,772 KB
testcase_02 AC 60 ms
22,676 KB
testcase_03 AC 60 ms
22,640 KB
testcase_04 AC 61 ms
24,404 KB
testcase_05 AC 61 ms
24,352 KB
testcase_06 AC 60 ms
22,456 KB
testcase_07 AC 61 ms
22,480 KB
testcase_08 AC 61 ms
24,356 KB
testcase_09 AC 61 ms
24,372 KB
testcase_10 AC 60 ms
20,336 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.Linq;

namespace BingoGame_CS
{
    class Program
    {
        static void Main(string[] args)
        {
            Solver sol = new Solver();
            sol.Solve();
        }
    }
    class Solver
    {
        int N;
        const int max = 99;

        public void Solve()
        {
            double ans = 12.0 * N * (N - 1) * (N - 2) * (N - 3) * (N - 4) / ((double)max * (max - 1) * (max - 2) * (max - 3) * (max - 4));
            Console.WriteLine(ans);
        }

        public Solver()
        {
            N = ri();
        }

        static String rs() { return Console.ReadLine(); }
        static int ri() { return int.Parse(Console.ReadLine()); }
        static long rl() { return long.Parse(Console.ReadLine()); }
        static double rd() { return double.Parse(Console.ReadLine()); }
        static String[] rsa() { return Console.ReadLine().Split(' '); }
        static int[] ria() { return Console.ReadLine().Split(' ').Select(e => int.Parse(e)).ToArray(); }
        static long[] rla() { return Console.ReadLine().Split(' ').Select(e => long.Parse(e)).ToArray(); }
        static double[] rda() { return Console.ReadLine().Split(' ').Select(e => double.Parse(e)).ToArray(); }
    }
}
0