結果
| 問題 |
No.212 素数サイコロと合成数サイコロ (2)
|
| コンテスト | |
| ユーザー |
kuuso1
|
| 提出日時 | 2015-05-22 22:27:33 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 27 ms / 5,000 ms |
| コード長 | 1,083 bytes |
| コンパイル時間 | 1,176 ms |
| コンパイル使用メモリ | 115,228 KB |
| 実行使用メモリ | 27,796 KB |
| 最終ジャッジ日時 | 2024-07-06 05:04:22 |
| 合計ジャッジ時間 | 2,023 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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.Linq;
class TEST{
static void Main(){
Sol mySol =new Sol();
mySol.Solve();
}
}
class Sol{
public void Solve(){
int[] pd=new int[]{2,3,5,7,11,13};
int[] cd=new int[]{4,6,8,9,10,12};
double pm=pd.Sum()/6.0;
double cm=cd.Sum()/6.0;
double ans=1.0;
for(int i=0;i<P;i++)ans*=pm;
for(int i=0;i<C;i++)ans*=cm;
Console.WriteLine(ans);
}
int P,C;
public Sol(){
var d=ria();
P=d[0];C=d[1];
}
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 Array.ConvertAll(Console.ReadLine().Split(' '),e=>int.Parse(e));}
static long[] rla(){return Array.ConvertAll(Console.ReadLine().Split(' '),e=>long.Parse(e));}
static double[] rda(){return Array.ConvertAll(Console.ReadLine().Split(' '),e=>double.Parse(e));}
}
kuuso1