結果

問題 No.549 素材合成システム
ユーザー kohaku_kohakukohaku_kohaku
提出日時 2017-07-28 22:47:48
言語 Java21
(openjdk 21)
結果
AC  
実行時間 620 ms / 2,000 ms
コード長 429 bytes
コンパイル時間 3,930 ms
コンパイル使用メモリ 83,452 KB
実行使用メモリ 48,856 KB
最終ジャッジ日時 2024-04-18 10:37:46
合計ジャッジ時間 21,549 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
41,644 KB
testcase_01 AC 120 ms
41,288 KB
testcase_02 AC 120 ms
41,428 KB
testcase_03 AC 99 ms
41,216 KB
testcase_04 AC 112 ms
41,236 KB
testcase_05 AC 116 ms
41,308 KB
testcase_06 AC 112 ms
41,144 KB
testcase_07 AC 552 ms
48,492 KB
testcase_08 AC 547 ms
48,428 KB
testcase_09 AC 520 ms
48,544 KB
testcase_10 AC 620 ms
48,652 KB
testcase_11 AC 536 ms
48,496 KB
testcase_12 AC 576 ms
48,856 KB
testcase_13 AC 605 ms
48,704 KB
testcase_14 AC 607 ms
48,676 KB
testcase_15 AC 544 ms
48,804 KB
testcase_16 AC 510 ms
48,572 KB
testcase_17 AC 510 ms
48,328 KB
testcase_18 AC 490 ms
48,044 KB
testcase_19 AC 463 ms
48,256 KB
testcase_20 AC 462 ms
48,064 KB
testcase_21 AC 442 ms
47,988 KB
testcase_22 AC 416 ms
48,224 KB
testcase_23 AC 446 ms
48,120 KB
testcase_24 AC 530 ms
47,276 KB
testcase_25 AC 494 ms
48,500 KB
testcase_26 AC 561 ms
48,644 KB
testcase_27 AC 535 ms
48,440 KB
testcase_28 AC 109 ms
40,272 KB
testcase_29 AC 113 ms
40,944 KB
testcase_30 AC 100 ms
41,196 KB
testcase_31 AC 466 ms
47,980 KB
testcase_32 AC 504 ms
48,304 KB
testcase_33 AC 433 ms
48,240 KB
testcase_34 AC 470 ms
48,440 KB
testcase_35 AC 464 ms
48,100 KB
testcase_36 AC 477 ms
48,644 KB
testcase_37 AC 473 ms
48,460 KB
testcase_38 AC 95 ms
41,916 KB
testcase_39 AC 113 ms
41,104 KB
testcase_40 AC 476 ms
48,516 KB
testcase_41 AC 359 ms
48,208 KB
testcase_42 AC 182 ms
43,460 KB
testcase_43 AC 315 ms
48,176 KB
testcase_44 AC 210 ms
46,616 KB
testcase_45 AC 318 ms
47,736 KB
testcase_46 AC 277 ms
47,912 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int [] x = new int [N];
        for(int i=0; i<N; i++){
            x[i] = sc.nextInt();
        }
        Arrays.sort(x);
        int ans = x[N-1];
        for(int i=0; i<N-1; i++){
            ans+=(x[i]/2);
        }
        System.out.println(ans);
    }
}
0