結果

問題 No.212 素数サイコロと合成数サイコロ (2)
ユーザー nuwasoginuwasogi
提出日時 2015-11-22 17:47:09
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 71 ms / 5,000 ms
コード長 667 bytes
コンパイル時間 3,151 ms
コンパイル使用メモリ 106,932 KB
実行使用メモリ 25,724 KB
最終ジャッジ日時 2023-10-11 18:15:06
合計ジャッジ時間 4,684 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
23,784 KB
testcase_01 AC 69 ms
23,668 KB
testcase_02 AC 69 ms
23,704 KB
testcase_03 AC 70 ms
23,884 KB
testcase_04 AC 69 ms
23,656 KB
testcase_05 AC 70 ms
25,696 KB
testcase_06 AC 70 ms
25,724 KB
testcase_07 AC 69 ms
23,744 KB
testcase_08 AC 71 ms
25,712 KB
testcase_09 AC 70 ms
23,656 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 PC_Dice_CS
{
    class Program
    {
        static void Main(string[] args)
        {
            int[] PC = Console.ReadLine().Split(' ').Select(v => int.Parse(v)).ToArray();
            int P = PC[0];
            int C = PC[1];
            double EP = (2 + 3 + 5 + 7 + 11 + 13) / 6.0;
            double EC = (4 + 6 + 8 + 9 + 10 + 12) / 6.0;
            double ex = 1.0;
            for (int p = 0; p < P; p++)
            {
                ex *= EP;
            }
            for (int c = 0; c < C; c++)
            {
                ex *= EC;
            }
            Console.WriteLine("{0}", ex);
        }
    }
}
0