結果
| 問題 |
No.212 素数サイコロと合成数サイコロ (2)
|
| コンテスト | |
| ユーザー |
mban
|
| 提出日時 | 2017-01-13 11:02:17 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 31 ms / 5,000 ms |
| コード長 | 1,622 bytes |
| コンパイル時間 | 1,130 ms |
| コンパイル使用メモリ | 115,692 KB |
| 実行使用メモリ | 28,036 KB |
| 最終ジャッジ日時 | 2024-12-21 11:53:36 |
| 合計ジャッジ時間 | 1,845 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Text;
using System.Text.RegularExpressions;
using System.Linq;
using System.IO;
class Program
{
static private Magatro M = new Magatro();
static private void Main(string[]args)
{
M.Scan();
M.Solve();
}
}
public class Scanner
{
private string[] S;
private int Index;
private char Separator;
public Scanner(char separator = ' ')
{
Index = 0;
Separator = separator;
S = new string[0];
}
private string[] Line()
{
return Console.ReadLine().Split(Separator);
}
public string Next()
{
string result;
if (Index >= S.Length)
{
S = Line();
Index = 0;
}
result = S[Index];
Index++;
return result;
}
public int NextInt()
{
return int.Parse(Next());
}
public double NextDouble()
{
return double.Parse(Next());
}
public long NextLong()
{
return long.Parse(Next());
}
}
public class Magatro
{
private int P, C;
readonly int[] Prime = new int[] { 2, 3, 5, 7, 11, 13 };
readonly int[] Non = new int[] { 4, 6, 8, 9, 10, 12 };
public void Scan()
{
Scanner sc = new Scanner();
P = sc.NextInt();
C = sc.NextInt();
}
public void Solve()
{
double ans = 1;
ans *= Math.Pow((double)Prime.Sum()/6,P);
ans *= Math.Pow((double)Non.Sum()/6,C);
Console.WriteLine(ans);
}
}
mban