結果
問題 |
No.112 ややこしい鶴亀算
|
ユーザー |
![]() |
提出日時 | 2019-12-31 01:59:38 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 271 bytes |
コンパイル時間 | 1,564 ms |
コンパイル使用メモリ | 165,512 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-17 00:09:38 |
合計ジャッジ時間 | 2,341 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 23 |
ソースコード
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { int n; cin >> n; int s = 0; for (int i = 0; i < n; i++) { int a; cin >> a; s += a; } s /= (n - 1); cout << 2 * n - s / 2 << " " << s / 2 - n << endl; return 0; }