結果
| 問題 | No.58 イカサマなサイコロ |
| コンテスト | |
| ユーザー |
しらっ亭
|
| 提出日時 | 2015-08-22 12:13:27 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 664 bytes |
| 記録 | |
| コンパイル時間 | 111 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 11,392 KB |
| 最終ジャッジ日時 | 2024-07-18 12:41:30 |
| 合計ジャッジ時間 | 54,138 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 9 WA * 1 |
ソースコード
import random
import threading
from time import sleep
def solve():
N = int(input())
K = int(input())
stop_event = threading.Event()
def monte():
w = g = 0
while not stop_event.is_set():
x = y = 0
for j in range(N):
if j < K:
x += random.randint(4, 6)
else:
x += random.randint(1, 6)
y += random.randint(1, 6)
g += 1
if x > y:
w += 1
print(w / g)
threading.Thread(target=monte).start()
sleep(4.8)
stop_event.set()
if __name__ == '__main__':
solve()
しらっ亭