結果
| 問題 |
No.212 素数サイコロと合成数サイコロ (2)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-09-20 12:03:49 |
| 言語 | D (dmd 2.109.1) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 5,000 ms |
| コード長 | 476 bytes |
| コンパイル時間 | 2,753 ms |
| コンパイル使用メモリ | 161,024 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-12 04:30:27 |
| 合計ジャッジ時間 | 3,002 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 |
ソースコード
import std.algorithm, std.array, std.container, std.range, std.bitmanip;
import std.numeric, std.math, std.bigint, std.random, core.bitop;
import std.string, std.regex, std.conv, std.stdio, std.typecons;
const auto di1 = [2, 3, 5, 7, 11, 13];
const auto di2 = [4, 6, 8, 9, 10, 12];
void main()
{
auto rd = readln.split.map!(to!int);
auto p = rd[0], c = rd[1];
auto e1 = di1.sum.to!real / 6;
auto e2 = di2.sum.to!real / 6;
writefln("%.10f", e1 ^^ p * e2 ^^ c);
}