#include #include using namespace std; using namespace atcoder; using ll = long long; constexpr ll mod = 1e9 + 7; constexpr ll INF = 1LL << 60; #define REP(i, init, n) for(int i = (int)(init); i < (int)(n); i++) #define All(A) A.begin(), A.end() #define rAll(A) A.rbegin(), A.rend() #define vi vector #define vl vector #define vvi vector> #define vvl vector> #define pint pair #define plong pair int N; vi A; void solve() { vector> freqs = { {"C4", 261.6}, {"D4", 294.3}, {"E4", 327.0}, {"F4", 348.8}, {"G4", 392.4}, {"A4", 436.0}, {"B4", 490.5} }; string ans = ""; long min_error = LONG_MAX; for(pair freq: freqs) { long error_sum = 0.0; int shift = 44100 / freq.second; REP(i, 0, 44100) { if(i - shift <= 0) continue; error_sum += A[i] - A[i - shift]; } if(min_error > error_sum) { ans = freq.first; } // cout << error_sum << endl; } cout << ans << endl; } int main() { cin >> N; A.resize(N); REP(i, 0, N) { cin >> A[i]; } solve(); }