結果
問題 | No.662 スロットマシーン |
ユーザー | Daigo HIROOKA |
提出日時 | 2018-06-09 04:08:25 |
言語 | Java21 (openjdk 21) |
結果 |
WA
|
実行時間 | - |
コード長 | 899 bytes |
コンパイル時間 | 4,273 ms |
コンパイル使用メモリ | 74,768 KB |
実行使用メモリ | 60,956 KB |
最終ジャッジ日時 | 2023-09-13 01:38:34 |
合計ジャッジ時間 | 8,993 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 121 ms
57,456 KB |
testcase_01 | AC | 125 ms
55,820 KB |
testcase_02 | AC | 134 ms
55,800 KB |
testcase_03 | AC | 160 ms
56,484 KB |
testcase_04 | AC | 174 ms
56,840 KB |
testcase_05 | AC | 137 ms
55,620 KB |
testcase_06 | WA | - |
testcase_07 | AC | 178 ms
58,736 KB |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | AC | 122 ms
56,152 KB |
testcase_17 | WA | - |
testcase_18 | WA | - |
ソースコード
import java.util.*; public class No662{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); String[] str = new String[5]; int[] coin = new int[5]; for(int i = 0; i < 5; i++){ str[i] = sc.next(); coin[i] = sc.nextInt(); } int[] n = new int[3]; int[][] reels = new int[3][5]; for(int i = 0; i < 3; i++){ Arrays.fill(reels[i], 0); n[i] = sc.nextInt(); for(int j = 0; j < n[i]; j++){ int idx = Arrays.asList(str).indexOf(sc.next()); reels[i][idx]++; } } // System.out.println(Arrays.deepToString(reels)); int[] num_atari = new int[5]; int score_sum = 0; for(int i = 0; i < 5; i++){ num_atari[i] = reels[0][i]*reels[1][i]*reels[2][i]*5; score_sum += coin[i]*num_atari[i]; } System.out.println((double)score_sum/(double)(n[0]*n[1]*n[2])); for(int i = 0; i < 5; i++) System.out.println(num_atari[i]); } }