結果
| 問題 |
No.58 イカサマなサイコロ
|
| ユーザー |
threepipes_s
|
| 提出日時 | 2015-12-30 01:50:44 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 360 bytes |
| コンパイル時間 | 117 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 11,264 KB |
| 最終ジャッジ日時 | 2024-09-19 08:36:35 |
| 合計ジャッジ時間 | 8,041 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 5 WA * 5 |
ソースコード
import random
def win(n, k):
n -= k
sum = 0
for i in range(k):
sum += random.randint(4, 6)-random.randint(1, 6)
for i in range(n):
sum += random.randint(1, 6)-random.randint(1, 6)
return sum>0
n = int(input())
k = int(input())
trying = 100000
cnt = 0
for i in range(trying):
if(win(n, k)): cnt += 1
print(cnt/trying)
threepipes_s