結果

問題 No.549 素材合成システム
ユーザー 37zigen37zigen
提出日時 2020-03-21 19:01:45
言語 Java21
(openjdk 21)
結果
AC  
実行時間 562 ms / 2,000 ms
コード長 649 bytes
コンパイル時間 2,067 ms
コンパイル使用メモリ 72,596 KB
実行使用メモリ 62,928 KB
最終ジャッジ日時 2023-08-24 22:29:35
合計ジャッジ時間 22,703 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 124 ms
56,076 KB
testcase_01 AC 123 ms
56,292 KB
testcase_02 AC 124 ms
56,520 KB
testcase_03 AC 123 ms
55,936 KB
testcase_04 AC 122 ms
56,452 KB
testcase_05 AC 123 ms
55,868 KB
testcase_06 AC 121 ms
56,104 KB
testcase_07 AC 550 ms
60,796 KB
testcase_08 AC 532 ms
60,680 KB
testcase_09 AC 528 ms
60,884 KB
testcase_10 AC 556 ms
60,732 KB
testcase_11 AC 532 ms
60,760 KB
testcase_12 AC 523 ms
60,824 KB
testcase_13 AC 562 ms
60,724 KB
testcase_14 AC 524 ms
60,700 KB
testcase_15 AC 555 ms
61,184 KB
testcase_16 AC 516 ms
60,972 KB
testcase_17 AC 454 ms
60,696 KB
testcase_18 AC 413 ms
60,640 KB
testcase_19 AC 431 ms
60,524 KB
testcase_20 AC 417 ms
62,928 KB
testcase_21 AC 476 ms
60,688 KB
testcase_22 AC 471 ms
61,044 KB
testcase_23 AC 501 ms
60,524 KB
testcase_24 AC 544 ms
60,472 KB
testcase_25 AC 501 ms
60,424 KB
testcase_26 AC 535 ms
62,636 KB
testcase_27 AC 503 ms
60,832 KB
testcase_28 AC 123 ms
56,028 KB
testcase_29 AC 122 ms
55,880 KB
testcase_30 AC 120 ms
55,848 KB
testcase_31 AC 458 ms
60,896 KB
testcase_32 AC 448 ms
60,984 KB
testcase_33 AC 433 ms
60,488 KB
testcase_34 AC 464 ms
60,372 KB
testcase_35 AC 504 ms
60,400 KB
testcase_36 AC 464 ms
60,648 KB
testcase_37 AC 433 ms
61,036 KB
testcase_38 AC 122 ms
56,324 KB
testcase_39 AC 124 ms
56,212 KB
testcase_40 AC 469 ms
60,544 KB
testcase_41 AC 350 ms
60,468 KB
testcase_42 AC 209 ms
58,204 KB
testcase_43 AC 314 ms
60,428 KB
testcase_44 AC 232 ms
59,996 KB
testcase_45 AC 333 ms
60,524 KB
testcase_46 AC 282 ms
59,940 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.FileNotFoundException;
import java.util.Arrays;
import java.util.Scanner;

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


	static void tr(Object... objects) {
		System.out.println(Arrays.deepToString(objects));
	}

}
0