結果
問題 | No.58 イカサマなサイコロ |
ユーザー | 👑 Kazun |
提出日時 | 2020-10-03 02:56:16 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 4,695 ms / 5,000 ms |
コード長 | 377 bytes |
コンパイル時間 | 403 ms |
コンパイル使用メモリ | 87,120 KB |
実行使用メモリ | 78,848 KB |
最終ジャッジ日時 | 2023-09-25 04:37:11 |
合計ジャッジ時間 | 52,837 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 4,691 ms
78,420 KB |
testcase_01 | AC | 4,693 ms
78,384 KB |
testcase_02 | AC | 4,689 ms
78,788 KB |
testcase_03 | AC | 4,695 ms
78,848 KB |
testcase_04 | AC | 4,692 ms
78,640 KB |
testcase_05 | AC | 4,690 ms
78,668 KB |
testcase_06 | AC | 4,694 ms
78,456 KB |
testcase_07 | AC | 4,692 ms
78,320 KB |
testcase_08 | AC | 4,695 ms
78,352 KB |
testcase_09 | AC | 4,695 ms
78,568 KB |
ソースコード
from time import time from random import randint as ri N=int(input()) K=int(input()) START=time() TIME_LIMIT=4.6 Battle=0 Win=0 while time()-START<=TIME_LIMIT: Battle+=1 A=B=0 for i in range(N): A+=ri(1,6) for i in range(N): if i<K: B+=ri(4,6) else: B+=ri(1,6) if A<B: Win+=1 print(Win/Battle)