結果
問題 | No.212 素数サイコロと合成数サイコロ (2) |
ユーザー |
![]() |
提出日時 | 2015-11-22 17:47:09 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 31 ms / 5,000 ms |
コード長 | 667 bytes |
コンパイル時間 | 2,194 ms |
コンパイル使用メモリ | 105,216 KB |
実行使用メモリ | 19,968 KB |
最終ジャッジ日時 | 2024-09-13 17:11:02 |
合計ジャッジ時間 | 3,212 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 10 |
コンパイルメッセージ
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 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); } } }