結果
問題 |
No.58 イカサマなサイコロ
|
ユーザー |
|
提出日時 | 2025-04-18 08:42:11 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 1,001 ms / 5,000 ms |
コード長 | 355 bytes |
コンパイル時間 | 588 ms |
コンパイル使用メモリ | 82,004 KB |
実行使用メモリ | 77,268 KB |
最終ジャッジ日時 | 2025-04-18 08:42:20 |
合計ジャッジ時間 | 7,326 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 10 |
ソースコード
import random N = int(input()) K = int(input()) total = 0 win = 0 for i in range(10**6): a = 0 # 次郎君のサイコロ b = 0 # 太郎君のサイコロ for j in range(N): a += random.randint(1, 6) if j < K: b += random.randint(4, 6) else: b += random.randint(1, 6) if b > a: win += 1 total += 1 print(win/total)