結果
問題 | No.211 素数サイコロと合成数サイコロ (1) |
ユーザー |
|
提出日時 | 2016-09-20 11:37:58 |
言語 | D (dmd 2.109.1) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 454 bytes |
コンパイル時間 | 2,772 ms |
コンパイル使用メモリ | 160,116 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-12 04:30:19 |
合計ジャッジ時間 | 3,367 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 33 |
ソースコード
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 k = readln.chomp.to!int; auto r = 0; foreach (d1; di1) foreach (d2; di2) if (d1 * d2 == k) ++r; writefln("%.13f", r.to!real / 36); }