結果
問題 | No.112 ややこしい鶴亀算 |
ユーザー |
|
提出日時 | 2015-04-18 02:08:31 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 299 bytes |
コンパイル時間 | 502 ms |
コンパイル使用メモリ | 58,868 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-04 16:08:54 |
合計ジャッジ時間 | 1,257 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 23 |
ソースコード
#include <iostream> #include <vector> using namespace std; int main() { int n; cin >> n; vector<int> a(n); int sum_a = 0; for (int i = 0; i < n; i++) { cin >> a[i]; sum_a += a[i]; } int sum_x = sum_a / (n - 1); int t = 2 * n - sum_x / 2; int k = n - t; cout << t << " " << k << endl; }