結果

問題 No.112 ややこしい鶴亀算
ユーザー eri
提出日時 2015-07-08 00:16:01
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 256 bytes
コンパイル時間 324 ms
コンパイル使用メモリ 53,980 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-08 01:33:51
合計ジャッジ時間 1,001 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
using namespace std;
int main(void){
	int n; cin >> n;
	int sum = 0, a;
	for (int i = 0; i < n; i++){
		cin >> a;
		sum += a;
	}
	int x = sum / (n - 1);
	int t = 2 * n - x / 2;
	int k = n - t;
	cout << t << " " << k << endl;
	return 0;
}
0