結果

問題 No.112 ややこしい鶴亀算
ユーザー 👑 CleyL
提出日時 2019-04-04 07:54:06
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 229 bytes
コンパイル時間 583 ms
コンパイル使用メモリ 53,876 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-24 14:19:09
合計ジャッジ時間 1,567 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;
int main(){
  int n;cin>>n;
  int sm = 0;
  for(int i = 0; n > i; i++){
    int tmp;cin >> tmp;sm += tmp;
  }
  sm /= (n-1);
  int km = (sm-(2*n))/2;
  cout << n-km << " " << km << endl;
}
0