結果
| 問題 |
No.112 ややこしい鶴亀算
|
| コンテスト | |
| ユーザー |
tenkyu9
|
| 提出日時 | 2018-03-09 00:09:37 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 477 bytes |
| コンパイル時間 | 636 ms |
| コンパイル使用メモリ | 81,888 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-10-05 08:19:31 |
| 合計ジャッジ時間 | 1,302 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 23 |
ソースコード
#include<iostream>
#include<string>
#include<algorithm>
#include<cmath>
#include<iomanip>
#include<cstring>
#include<map>
#include<vector>
#include<queue>
#include<utility>
using namespace std;
typedef long long int ll;
int main(){
int n, a[50], sum=0;
cin >> n;
for(int i=0; i<n; i++){
cin >> a[i];
sum+=a[i];
}
sum/=(n-1);
int ans[2]={};
for(int i=0; i<n; i++){
ans[(sum-a[i]==4)]++;
}
cout << ans[0] << ' ' << ans[1] << endl;
return 0;
}
tenkyu9