結果
問題 | No.242 ビンゴゲーム |
ユーザー |
![]() |
提出日時 | 2015-12-02 15:14:20 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 26 ms / 2,000 ms |
コード長 | 1,238 bytes |
コンパイル時間 | 2,274 ms |
コンパイル使用メモリ | 107,264 KB |
実行使用メモリ | 18,944 KB |
最終ジャッジ日時 | 2024-09-14 07:52:46 |
合計ジャッジ時間 | 2,249 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge6 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 8 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
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(); }}}