結果
問題 | No.58 イカサマなサイコロ |
ユーザー | kou6839 |
提出日時 | 2015-01-02 02:11:49 |
言語 | Java21 (openjdk 21) |
結果 |
WA
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 607 bytes |
コンパイル時間 | 2,283 ms |
コンパイル使用メモリ | 71,288 KB |
実行使用メモリ | 55,840 KB |
最終ジャッジ日時 | 2023-09-03 20:22:13 |
合計ジャッジ時間 | 5,906 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | AC | 309 ms
39,360 KB |
testcase_02 | AC | 156 ms
39,380 KB |
testcase_03 | AC | 131 ms
39,760 KB |
testcase_04 | AC | 233 ms
39,664 KB |
testcase_05 | AC | 304 ms
55,840 KB |
testcase_06 | AC | 346 ms
55,512 KB |
testcase_07 | AC | 191 ms
55,788 KB |
testcase_08 | WA | - |
testcase_09 | AC | 291 ms
39,232 KB |
ソースコード
import java.math.*; import java.util.*; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int win=0; for(int i=0;i<400000;i++){ int ji=0; int ta=0; for(int j=0;j<a;j++){ ji+=Math.random()*6+1; } for(int j=0;j<b;j++){ ta+=Math.random()*3+4; } for(int j=0;j<a-b;j++){ ta+=Math.random()*6+1; } if(ta>ji) win++; } System.out.println(1.0*win/400000); } }