結果
| 問題 |
No.211 素数サイコロと合成数サイコロ (1)
|
| コンテスト | |
| ユーザー |
mesh1nek0x0
|
| 提出日時 | 2018-07-23 21:50:08 |
| 言語 | Ruby (3.4.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 280 bytes |
| コンパイル時間 | 177 ms |
| コンパイル使用メモリ | 7,552 KB |
| 実行使用メモリ | 12,288 KB |
| 最終ジャッジ日時 | 2024-12-30 17:55:31 |
| 合計ジャッジ時間 | 5,047 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 1 WA * 32 |
コンパイルメッセージ
Syntax OK
ソースコード
#!/bin/ruby
K = gets.chomp.to_i
if [1, 3, 5, 7, 11, 13].include?(K)
puts "%.12f" % 0
else
sum = 0.0
[1, 3, 5, 7, 11, 13].each do | num |
if K % num === 0 && [4, 6, 8, 9, 10, 12].include?(K / num)
sum += 1.0
end
end
puts sum
puts "%.12f" % (sum / 36)
end
mesh1nek0x0