結果
| 問題 |
No.212 素数サイコロと合成数サイコロ (2)
|
| コンテスト | |
| ユーザー |
izuru_matsuura
|
| 提出日時 | 2016-11-22 17:14:51 |
| 言語 | D (dmd 2.109.1) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 5,000 ms |
| コード長 | 594 bytes |
| コンパイル時間 | 2,595 ms |
| コンパイル使用メモリ | 154,688 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-12 05:11:01 |
| 合計ジャッジ時間 | 3,055 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 |
ソースコード
import std.algorithm;
import std.array;
import std.ascii;
import std.container;
import std.conv;
import std.math;
import std.numeric;
import std.range;
import std.stdio;
import std.string;
import std.typecons;
void log(A...)(A arg) {
stderr.writeln(arg);
}
int size(T)(in T s) {
return cast(int)s.length;
}
void main() {
auto p = [2,3,5,7,11,13];
auto c = [4,6,8,9,10,12];
real x = reduce!"a + b"(0, p) / cast(double)p.length;
real y = reduce!"a + b"(0, c) / cast(double)c.length;
int P, C; readf("%d %d\n", &P, &C);
writefln("%.12f", (x ^^ P) * (y ^^ C));
}
izuru_matsuura