結果
問題 |
No.211 素数サイコロと合成数サイコロ (1)
|
ユーザー |
![]() |
提出日時 | 2015-10-09 15:11:52 |
言語 | D (dmd 2.109.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 395 bytes |
コンパイル時間 | 2,421 ms |
コンパイル使用メモリ | 144,128 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-12 02:44:39 |
合計ジャッジ時間 | 3,225 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 25 WA * 8 |
ソースコード
import std.stdio; import std.string; import std.conv; void main(){ int n = to!int(chomp(readln())); int[] arr = new int[157]; real ans; int[] prime = [2, 3, 5, 7, 11, 13]; int[] nonprime = [4, 6, 8, 9, 10, 12]; foreach(ref i; prime){ foreach(ref j; nonprime){ arr[i * j]++; } } writeln(arr[n]/36f); }