結果

問題 No.112 ややこしい鶴亀算
ユーザー mits58
提出日時 2016-07-02 11:50:19
言語 Java
(openjdk 23)
結果
AC  
実行時間 169 ms / 5,000 ms
コード長 285 bytes
コンパイル時間 2,415 ms
コンパイル使用メモリ 75,848 KB
実行使用メモリ 42,416 KB
最終ジャッジ日時 2024-10-12 02:26:27
合計ジャッジ時間 7,471 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main{
	public static void main(String[] args){
		Scanner sc=new Scanner(System.in);
			int n=sc.nextInt(); int s=0;
			for(int i=0;i<n;i++) s+=sc.nextInt();
			int x=(4*n-s/(n-1))/2;
			int y=(s/(n-1)-2*n)/2;
			System.out.println(x+" "+y);
	}
}
0