結果

問題 No.549 素材合成システム
ユーザー 37zigen
提出日時 2020-03-21 19:01:45
言語 Java
(openjdk 23)
結果
AC  
実行時間 769 ms / 2,000 ms
コード長 649 bytes
コンパイル時間 2,300 ms
コンパイル使用メモリ 75,336 KB
実行使用メモリ 48,820 KB
最終ジャッジ日時 2024-12-23 08:54:14
合計ジャッジ時間 22,908 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 44
権限があれば一括ダウンロードができます

ソースコード

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