結果
| 問題 | No.58 イカサマなサイコロ |
| コンテスト | |
| ユーザー |
しらっ亭
|
| 提出日時 | 2015-08-22 12:13:27 |
| 言語 | Python3 (3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 4,910 ms / 5,000 ms |
| + 915µs | |
| コード長 | 664 bytes |
| 記録 | |
| コンパイル時間 | 283 ms |
| コンパイル使用メモリ | 21,408 KB |
| 実行使用メモリ | 16,336 KB |
| 最終ジャッジ日時 | 2026-08-17 03:32:48 |
| 合計ジャッジ時間 | 55,737 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 |
ソースコード
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()
しらっ亭