結果
問題 | No.112 ややこしい鶴亀算 |
ユーザー |
![]() |
提出日時 | 2017-08-29 22:07:12 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 264 bytes |
コンパイル時間 | 415 ms |
コンパイル使用メモリ | 55,576 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-06 09:46:41 |
合計ジャッジ時間 | 1,475 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 23 |
ソースコード
#include <iostream> using namespace std; int main() { int n, t, sum = 0; cin >> n; for (int i = 0; i < n; i++) { cin >> t; sum += t; } int crane = 2 * n - sum / (2 * (n - 1)); int turtle = n - crane; cout << crane << " " << turtle << endl; }