結果
問題 | No.211 素数サイコロと合成数サイコロ (1) |
ユーザー |
👑 |
提出日時 | 2019-03-29 00:30:45 |
言語 | Lua (LuaJit 2.1.1734355927) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 291 bytes |
コンパイル時間 | 109 ms |
コンパイル使用メモリ | 6,948 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-15 04:39:56 |
合計ジャッジ時間 | 1,214 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 33 |
ソースコード
k = io.read("*n") a = {2,3,5,7,11,13} b = {4,6,8,9,10,12} t = {} for i = 1, 6 do for j = 1, 6 do c = a[i] * b[j] if(t[c] == nil) then t[c] = 1 / 36 else t[c] = t[c] + 1 / 36 end end end if(t[k] == nil) then print("0") else io.write(string.format("%.13f\n", t[k])) end