結果

問題 No.549 素材合成システム
ユーザー Amanita2016Amanita2016
提出日時 2017-08-02 12:31:47
言語 Java21
(openjdk 21)
結果
AC  
実行時間 358 ms / 2,000 ms
コード長 845 bytes
コンパイル時間 2,796 ms
コンパイル使用メモリ 75,316 KB
実行使用メモリ 54,172 KB
最終ジャッジ日時 2024-04-19 13:26:22
合計ジャッジ時間 14,084 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 96 ms
41,056 KB
testcase_01 AC 105 ms
40,120 KB
testcase_02 AC 106 ms
41,308 KB
testcase_03 AC 107 ms
41,264 KB
testcase_04 AC 109 ms
41,032 KB
testcase_05 AC 107 ms
41,496 KB
testcase_06 AC 109 ms
41,736 KB
testcase_07 AC 309 ms
52,732 KB
testcase_08 AC 318 ms
51,848 KB
testcase_09 AC 295 ms
51,704 KB
testcase_10 AC 318 ms
52,036 KB
testcase_11 AC 308 ms
52,092 KB
testcase_12 AC 308 ms
52,524 KB
testcase_13 AC 305 ms
52,624 KB
testcase_14 AC 358 ms
51,992 KB
testcase_15 AC 303 ms
52,424 KB
testcase_16 AC 320 ms
52,060 KB
testcase_17 AC 272 ms
51,884 KB
testcase_18 AC 254 ms
51,328 KB
testcase_19 AC 270 ms
51,560 KB
testcase_20 AC 237 ms
51,664 KB
testcase_21 AC 342 ms
53,672 KB
testcase_22 AC 286 ms
51,856 KB
testcase_23 AC 357 ms
54,172 KB
testcase_24 AC 292 ms
51,984 KB
testcase_25 AC 291 ms
51,728 KB
testcase_26 AC 291 ms
51,996 KB
testcase_27 AC 303 ms
51,428 KB
testcase_28 AC 98 ms
41,604 KB
testcase_29 AC 98 ms
41,528 KB
testcase_30 AC 102 ms
41,172 KB
testcase_31 AC 259 ms
51,492 KB
testcase_32 AC 270 ms
51,668 KB
testcase_33 AC 268 ms
51,668 KB
testcase_34 AC 275 ms
51,568 KB
testcase_35 AC 315 ms
53,868 KB
testcase_36 AC 272 ms
51,764 KB
testcase_37 AC 264 ms
51,468 KB
testcase_38 AC 101 ms
41,576 KB
testcase_39 AC 96 ms
41,720 KB
testcase_40 AC 282 ms
51,268 KB
testcase_41 AC 206 ms
45,028 KB
testcase_42 AC 132 ms
41,888 KB
testcase_43 AC 190 ms
47,668 KB
testcase_44 AC 154 ms
42,616 KB
testcase_45 AC 221 ms
48,224 KB
testcase_46 AC 195 ms
44,572 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package yukicoder;

import java.util.Scanner;

public class Main {

    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
        line = sc.nextLine();
        String[] spl = line.split(" ");
        
        int exp[] = new int[spl.length];
        int i = 0;
        
        for(String a : spl){
        	exp[i++] = Integer.parseInt(a);
        }
        
        int max = 0;
        for(int a : exp){
        	if(a > max){
        		max = a;
        	}
        }
        
        boolean flg = true;
        int maxExp = 0;
        for(int a : exp){
        	if(a == max && flg){
        		flg = false;
        		maxExp += a;
        	}else{
        		maxExp += a/2;
        	}
        }
        System.out.println(maxExp);
	}
}
0