QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#918690#8484. Not Everything Is So AmbiguousNYCU_MyGOAC ✓2ms3712kbC++2311.6kb2025-02-27 22:10:322025-02-27 22:10:32

Judging History

This is the latest submission verdict.

  • [2025-02-27 22:10:32]
  • Judged
  • Verdict: AC
  • Time: 2ms
  • Memory: 3712kb
  • [2025-02-27 22:10:32]
  • Submitted

answer

#ifndef SorahISA
#define SorahISA
#include SorahISA __FILE__ SorahISA

const int maxx = 1'000'000'000;
const int maxb = 2'023;

void solve() {
    int N; cin >> N;
    
    auto ask = [&](int x) -> int {
        cout << "?" << " " << x << "\n" << flush;
        int ret; cin >> ret;
        return ret;
    };
    
    int lo = 1, hi = maxx * maxb, mi;
    while (lo < hi) {
        mi = (lo + hi) >> 1;
        if (ask(mi) > N) hi = mi;
        else             lo = mi + 1;
    }
    
    int D1 = lo;
    
    hi = maxx * maxb * maxb;
    while (lo < hi) {
        mi = (lo + hi) >> 1;
        if (ask(mi) > N+1) hi = mi;
        else               lo = mi + 1;
    }
    
    int D2 = lo;
    
    /// D2 - D1 = (b-1) * b^N ///
    
    int B = -1, X = -1;
    for (int b = 2; b <= maxb; ++b) {
        int pow_b = 1;
        for (int n = 1; n <= N; ++n) pow_b *= b;
        if (D2 - D1 == (b - 1) * pow_b) { B = b, X = pow_b - D1; break; }
    }
    cout << "!" << " " << X << " " << B << "\n" << flush;
}

int32_t main() {
    fastIO();
    
    int t = 1; // cin >> t;
    for (int _ = 1; _ <= t; ++_) {
        // cout << "Case #" << _ << ": ";
        solve();
    }
    
    return 0;
}

#else

#ifdef local
#define _GLIBCXX_DEBUG 1
#endif
#pragma GCC optimize("Ofast", "unroll-loops")
#include <bits/stdc++.h>
using namespace std;
// #include <bits/extc++.h>
// #include <tr2/dynamic_bitset>

using i64 = long long;
using i128 = __int128;
#define int i64
using f80 = long double;
using f128 = __float128;
#define double f80
using pii = pair<int, int>;
template <typename T> using Prior = std::priority_queue<T>;
template <typename T> using prior = std::priority_queue<T, vector<T>, greater<T>>;

// #define X first
// #define Y second
#define eb emplace_back
#define ef emplace_front
#define ee emplace
#define pb pop_back
#define pf pop_front
#define ALL(x) begin(x), end(x)
#define RALL(x) rbegin(x), rend(x)
#define SZ(x) ((int)(x).size())
#define popcnt(x) __builtin_popcountll(x)

// template <size_t D, typename T> struct Vec : vector<Vec<D-1, T>> {
//     static_assert(D >= 1, "Vector dimension must be greater than zero!");
//     template <typename... Args> Vec(int n = 0, Args... args) : vector<Vec<D-1, T>>(n, Vec<D-1, T>(args...)) {}
// };

// template <typename T> struct Vec<1, T> : vector<T> {
//     Vec(int n = 0, const T& val = T()) : vector<T>(n, val) {}
// };

template <typename T> ostream& operator << (ostream &os, const vector<T> &vec)
{ for (size_t i = 0; i < size(vec); ++i) { if (i) os << " "; os << vec[i]; } return os; }

#ifdef local
#define fastIO() void()
#define debug(...) \
    _color.emplace_back("\u001b[31m"), \
    fprintf(stderr, "%sAt [%s], line %d: (%s) = ", _color.back().c_str(), __FUNCTION__, __LINE__, #__VA_ARGS__), \
    _do(__VA_ARGS__), _color.pop_back(), \
    fprintf(stderr, "%s", _color.back().c_str())
#define print(...) \
    fprintf(stdout, "%s", "\u001b[36m"), \
    _P(__VA_ARGS__), \
    fprintf(stdout, "%s", "\u001b[0m")

deque<string> _color{"\u001b[0m"};

template <typename T> concept is_string = is_same_v<T, string&> or is_same_v<T, const string&>;
template <typename T> concept is_iterable = requires (T _t) { begin(_t); };

template <typename T> inline void _print_err(T &&_t);
template <typename T> inline void _print_err(T &&_t) requires is_iterable<T> and (not is_string<T>);
template <size_t I, typename ...U> inline typename enable_if<I == sizeof...(U), void>::type _print_err(const tuple<U...> &);
template <size_t I, typename ...U> inline typename enable_if<I <  sizeof...(U), void>::type _print_err(const tuple<U...> &_t);
template <size_t I, typename ...U> inline typename enable_if<I == sizeof...(U), void>::type _print_err(tuple<U...> &);
template <size_t I, typename ...U> inline typename enable_if<I <  sizeof...(U), void>::type _print_err(tuple<U...> &_t);
template <typename T, typename U> ostream& operator << (ostream &os, const pair<T, U> &_tu);

inline void _do() { cerr << "\n"; }
template <typename T> inline void _do(T &&_t) { _print_err(_t), cerr << "\n"; }
template <typename T, typename ...U> inline void _do(T &&_t, U &&..._u) { _print_err(_t), cerr << ", ", _do(_u...); }
#else
#define fastIO() cin.tie(0)->sync_with_stdio(0)
#define debug(...) void()
#define print(...) _P(__VA_ARGS__)
#endif

inline void _P() { cout << "\n"; }
template <typename T> inline void _P(T &&_t) { cout << _t << "\n"; }
template <typename T, typename ...U> inline void _P(T &&_t, U &&..._u) { cout << _t << " ", _P(_u...); }

mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());

inline int getRand(int L, int R) {
    if (L > R) swap(L, R);
    return (int)(rng() % ((uint64_t)R - L + 1) + L);
}

template <typename T, typename U> bool chmin(T &lhs, U rhs) { return lhs > rhs ? lhs = rhs, 1 : 0; }
template <typename T, typename U> bool chmax(T &lhs, U rhs) { return lhs < rhs ? lhs = rhs, 1 : 0; }

template <typename T> void make_unique(vector<T> &vec) {
    if (not is_sorted(ALL(vec))) sort(ALL(vec));
    vec.erase(unique(ALL(vec)), end(vec));
}

/// below are Fast I/O and _print_err templates ///

/*
/// Fast I/O by FHVirus ///
/// https://fhvirus.github.io/blog/2020/fhvirus-io/ ///

#include <unistd.h>

const int S = 65536;

int OP = 0;
char OB[S];

inline char RC() {
    static char buf[S], *p = buf, *q = buf;
    return p == q and (q = (p = buf) + read(0, buf, S)) == buf ? -1 : *p++;
}

inline int RI() {
    static char c;
    int a;
    while (((c = RC()) < '0' or c > '9') and c != '-' and c != -1);
    if (c == '-') {
        a = 0;
        while ((c = RC()) >= '0' and c <= '9') a *= 10, a -= c ^ '0';
    }
    else {
        a = c ^ '0';
        while ((c = RC()) >= '0' and c <= '9') a *= 10, a += c ^ '0';
    }
    return a;
}

inline void WI(int n, char c = '\n') {
    static char buf[20], p;
    if (n == 0) OB[OP++] = '0';
    p = 0;
    if (n < 0) {
        OB[OP++] = '-';
        while (n) buf[p++] = '0' - (n % 10), n /= 10;
    }
    else {
        while (n) buf[p++] = '0' + (n % 10), n /= 10;
    }
    for (--p; p >= 0; --p) OB[OP++] = buf[p];
    OB[OP++] = c;
    if (OP > S-20) write(1, OB, OP), OP = 0;
}

/// Fast I/O by FHVirus ///
/// https://fhvirus.github.io/blog/2020/fhvirus-io/ ///
*/

#ifdef local

template <typename T> inline void _print_err(T &&_t) { cerr << _t; }

template <typename T> inline void _print_err(T &&_t) requires is_iterable<T> and (not is_string<T>) {
    _color.emplace_back(_color.back()), ++_color.back()[3];
    cerr << _color.back() << "[";
    for (bool _first = true; auto &_x : _t) {
        if (!_first) cerr << ", ";
        _print_err(_x), _first = false;
    }
    cerr << "]" << (_color.pop_back(), _color.back());
}

template <typename T, typename U> ostream& operator << (ostream &os, const pair<T, U> &_tu) {
    _color.emplace_back(_color.back()), ++_color.back()[3];
    cerr << _color.back() << "(";
    _print_err(_tu.first), cerr << ", ", _print_err(_tu.second);
    cerr << ")" << (_color.pop_back(), _color.back());
    return os;
}

template <size_t I = 0, typename ...U> inline typename enable_if<I == sizeof...(U), void>::type _print_err(const tuple<U...> &) {
    cerr << ")" << (_color.pop_back(), _color.back());
}

template <size_t I = 0, typename ...U> inline typename enable_if<I <  sizeof...(U), void>::type _print_err(const tuple<U...> &_t) {
    if (!I) {
        _color.emplace_back(_color.back()), ++_color.back()[3];
        cerr << _color.back();
    }
    cerr << (I ? ", " : "("), _print_err(get<I>(_t)), _print_err<I+1, U...>(_t);
}

template <size_t I = 0, typename ...U> inline typename enable_if<I == sizeof...(U), void>::type _print_err(tuple<U...> &) {
    cerr << ")" << (_color.pop_back(), _color.back());
}

template <size_t I = 0, typename ...U> inline typename enable_if<I <  sizeof...(U), void>::type _print_err(tuple<U...> &_t) {
    if (!I) {
        _color.emplace_back(_color.back()), ++_color.back()[3];
        cerr << _color.back();
    }
    cerr << (I ? ", " : "("), _print_err(get<I>(_t)), _print_err<I+1, U...>(_t);
}

#endif

#endif

/**
 *                                                                                                                 
 *                                                                                                                 
 *                                                                                                                 
 *                            iiiiii         iiiiiiiiii       iiiiiiiiiiiiii                                       
 *                       iiiiiiiiiiiii   iiiiiii    iiii    iiiiiiiiiiiiiii                          ii   iiii     
 *                    iiiiiiii     iiiiiiiii         iiii       iiii iii              iii          iiiiiiiiii      
 *                 iiiiiii          iiiiii           iiii    iiii   ii           iiiiiiiiii      iiii iiii         
 *               iiiiii            iiiii             iiii iiii        iii      iiii    iiiiiiiiiiiiiiiii  ii       
 *             iiiiii            iiiiiii            iiiiiii       iiiiiiii   iii    iiiiiiiiiiiiii iii  iiii       
 *           iiiiii             iiiiiii            iiiii   ii   iiii       iiiiiiiiiii iiii  iii iiii iiii      iii
 *          iiiii              iiiiiiii       ii        iiiii iiii    iiiiiiiii        iii iii  iii  iii  ii  iiii 
 *        iiiiii              iiiiiiii      iiiii     iiiii iiiiiiiiiiiiiiii         iii  iii  ii  iii  iii iiii   
 *       iiiii                 iiiiii     iiii     iiiiii iiiiiii    iii iii       iiii  ii   i   ii  iii  iii     
 *     iiiiii                            iiii  iiiiiiiiiiiiiii       iii iiii   iiiii  iii  ii  iii  iii  ii       
 *    iiiii                              iiiiiiii iiiiiiiiii       iiii   iiiiiiiii            ii  iii  ii         
 *   iiiii                                     iiiiii  iiii      iiiii              iii      ii   ii  i            
 * iiiiii                                  iiiiiiii   iiiii    iiiii                        ii  ii   ii            
 * iiiii                                iiii  iiii    iiiiiiiiiiii                             ii                  
 *  iii                              iiii   iiii       iiiiiiii                                                    
 *                                iiiii   iiii                                                                     
 *                              iiii     iiii                                                                      
 *                            iiii    iiiii                                                                        
 *                          iii     iiiii                                                                          
 *                        iii     iiiii                                                                            
 *                       iii   iiiiii                                                                              
 *                       iiiiiiiii                                                                                 
 *                       iiiiii                                                                                    
 *                                                                                                                 
 *                                                                                                                 
 *                                                                                                                 
**/

这程序好像有点Bug,我给组数据试试?

詳細信息

Test #1:

score: 100
Accepted
time: 0ms
memory: 3584kb

input:

1
40
39
38
37
36
35
34
33
32
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
5
4
3
2
2
51
50
49
48
47
46
45
44
43
42
41
40
39
38
37
36
35
34
33
32
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
5
4
3
2
3

output:

? 1011500000000
? 505750000000
? 252875000000
? 126437500000
? 63218750000
? 31609375000
? 15804687500
? 7902343750
? 3951171875
? 1975585938
? 987792969
? 493896485
? 246948243
? 123474122
? 61737061
? 30868531
? 15434266
? 7717133
? 3858567
? 1929284
? 964642
? 482321
? 241161
? 120581
? 60291
? 3...

result:

ok Correct guess

Test #2:

score: 0
Accepted
time: 0ms
memory: 3584kb

input:

4
13
12
12
12
11
11
11
10
10
10
9
9
9
9
8
8
8
7
7
7
6
6
6
6
5
5
5
4
5
5
5
5
4
4
4
5
4
4
4
5
5
16
16
15
15
15
14
14
14
13
13
13
12
12
12
12
11
11
11
10
10
10
9
9
9
9
8
8
8
7
7
7
6
6
6
6
5
5
6
6
6
6
6
5
6
5
5
6
5
5
5
6
5

output:

? 1011500000000
? 505750000000
? 252875000000
? 126437500000
? 63218750000
? 31609375000
? 15804687500
? 7902343750
? 3951171875
? 1975585938
? 987792969
? 493896485
? 246948243
? 123474122
? 61737061
? 30868531
? 15434266
? 7717133
? 3858567
? 1929284
? 964642
? 482321
? 241161
? 120581
? 60291
? 3...

result:

ok Correct guess

Test #3:

score: 0
Accepted
time: 2ms
memory: 3584kb

input:

3
4
4
4
4
4
4
4
4
3
3
3
4
3
4
3
3
3
3
4
3
4
4
4
4
4
4
4
4
4
4
4
3
3
3
4
3
4
3
3
3
5
5
5
5
5
5
5
4
5
5
5
5
4
4
5
5
5
5
5
4
5
5
4
4
5
4
4
5
4
4
5
5
4
5
4
4
4
4
4
5
5
5
5
4
4
5
5
5
5
5
5
5

output:

? 1011500000000
? 505750000000
? 252875000000
? 126437500000
? 63218750000
? 31609375000
? 15804687500
? 7902343750
? 3951171875
? 5926757813
? 6914550782
? 7408447266
? 7161499024
? 7284973145
? 7223236085
? 7254104615
? 7269538880
? 7277256013
? 7281114579
? 7279185296
? 7280149938
? 7279667617
? ...

result:

ok Correct guess

Test #4:

score: 0
Accepted
time: 0ms
memory: 3584kb

input:

30
40
39
38
37
36
35
34
34
33
32
31
31
31
31
30
31
31
30
30
31
31
31
30
30
30
31
31
31
30
30
30
31
30
30
30
31
30
30
31
31
30
51
50
49
48
47
46
45
44
43
42
41
40
39
38
37
36
35
34
34
33
32
31
32
32
32
31
31
32
32
31
31
32
31
31
32
31
31
32
31
32
31
31
32
31
32
31
31
32
32
31
31
32

output:

? 1011500000000
? 505750000000
? 252875000000
? 126437500000
? 63218750000
? 31609375000
? 15804687500
? 7902343750
? 3951171875
? 1975585938
? 987792969
? 493896485
? 246948243
? 123474122
? 61737061
? 92605592
? 77171327
? 69454194
? 73312761
? 75242044
? 74277403
? 73795082
? 73553922
? 73674502
...

result:

ok Correct guess

Test #5:

score: 0
Accepted
time: 0ms
memory: 3712kb

input:

1
4
4
4
4
4
4
4
3
3
3
3
3
3
3
3
3
3
3
2
2
2
2
2
2
2
2
2
2
2
1
2
2
2
1
2
2
1
2
2
1
1
5
5
5
5
5
5
5
4
4
4
4
4
4
4
4
4
4
4
3
3
3
3
3
3
3
3
3
3
3
2
3
3
3
2
3
3
2
3
2
3
2
2
2
2
3
2
2
2
2
3
2
3

output:

? 1011500000000
? 505750000000
? 252875000000
? 126437500000
? 63218750000
? 31609375000
? 15804687500
? 7902343750
? 3951171875
? 1975585938
? 987792969
? 493896485
? 246948243
? 123474122
? 61737061
? 30868531
? 15434266
? 7717133
? 3858567
? 1929284
? 964642
? 482321
? 241161
? 120581
? 60291
? 3...

result:

ok Correct guess

Test #6:

score: 0
Accepted
time: 0ms
memory: 3584kb

input:

1
5
4
4
4
4
4
4
4
4
4
4
3
3
3
3
3
3
3
3
3
3
2
2
2
2
2
2
2
2
2
2
1
1
1
2
1
2
2
1
2
2
6
6
5
5
5
5
5
5
5
5
5
5
4
4
4
4
4
4
4
4
4
4
3
3
3
3
3
3
3
3
3
3
2
2
3
2
3
2
3
2
3
3
3
3
2
3
2
2
2
2
2

output:

? 1011500000000
? 505750000000
? 252875000000
? 126437500000
? 63218750000
? 31609375000
? 15804687500
? 7902343750
? 3951171875
? 1975585938
? 987792969
? 493896485
? 246948243
? 123474122
? 61737061
? 30868531
? 15434266
? 7717133
? 3858567
? 1929284
? 964642
? 482321
? 241161
? 120581
? 60291
? 3...

result:

ok Correct guess

Test #7:

score: 0
Accepted
time: 2ms
memory: 3584kb

input:

3
7
6
6
6
6
6
6
6
5
5
5
5
5
5
4
4
4
4
4
4
4
3
4
4
3
4
4
4
3
3
3
3
3
3
3
4
4
3
3
4
3
8
8
8
8
8
8
7
7
7
7
7
7
6
6
6
6
6
6
6
5
5
5
5
5
5
4
5
5
5
4
4
4
5
5
4
5
4
4
5
4
5
5
5
4
4
5
4
4
5
5
5
5

output:

? 1011500000000
? 505750000000
? 252875000000
? 126437500000
? 63218750000
? 31609375000
? 15804687500
? 7902343750
? 3951171875
? 1975585938
? 987792969
? 493896485
? 246948243
? 123474122
? 61737061
? 30868531
? 15434266
? 7717133
? 3858567
? 1929284
? 964642
? 482321
? 723482
? 602902
? 542612
? ...

result:

ok Correct guess

Test #8:

score: 0
Accepted
time: 0ms
memory: 3584kb

input:

4
5
5
5
5
5
5
4
4
4
5
4
5
5
5
5
5
5
5
5
4
4
5
5
4
5
5
4
5
4
5
4
5
5
4
4
5
4
5
5
5
4
6
6
6
6
6
6
6
6
5
6
5
5
5
5
5
5
5
5
5
5
6
6
5
5
6
5
6
6
6
6
5
6
6
6
6
6
6
5
6
6
6
6
6
5
6
5
6
5
5
5
6
6

output:

? 1011500000000
? 505750000000
? 252875000000
? 126437500000
? 63218750000
? 31609375000
? 15804687500
? 23707031250
? 27658203125
? 29633789063
? 28645996094
? 29139892579
? 28892944337
? 28769470216
? 28707733155
? 28676864625
? 28661430360
? 28653713227
? 28649854661
? 28647925378
? 28648890020
?...

result:

ok Correct guess

Test #9:

score: 0
Accepted
time: 1ms
memory: 3712kb

input:

30
40
39
38
37
36
35
34
34
33
32
31
31
31
31
30
31
30
31
30
30
31
30
31
30
31
31
30
31
31
31
31
31
31
31
31
30
31
30
31
30
31
51
50
49
48
47
46
45
44
43
42
41
40
39
38
37
36
35
34
34
33
32
31
32
32
32
31
31
32
32
31
31
32
31
31
32
31
31
32
31
32
31
31
32
31
32
31
31
32
31
32
32
32

output:

? 1011500000000
? 505750000000
? 252875000000
? 126437500000
? 63218750000
? 31609375000
? 15804687500
? 7902343750
? 3951171875
? 1975585938
? 987792969
? 493896485
? 246948243
? 123474122
? 61737061
? 92605592
? 77171327
? 84888460
? 81029894
? 82959177
? 83923819
? 83441498
? 83682659
? 83562079
...

result:

ok Correct guess

Test #10:

score: 0
Accepted
time: 0ms
memory: 3456kb

input:

1
4
4
4
4
4
4
4
4
3
3
3
3
3
3
3
3
3
3
3
2
2
2
2
2
2
2
2
2
2
2
1
1
2
1
1
2
1
1
2
2
1
5
5
5
5
5
5
5
5
5
4
4
4
4
4
4
4
4
4
4
3
3
3
3
3
3
3
3
3
3
3
2
3
2
2
3
3
3
2
3
3
3
3
2
3
3
3
3
3
2
2
2

output:

? 1011500000000
? 505750000000
? 252875000000
? 126437500000
? 63218750000
? 31609375000
? 15804687500
? 7902343750
? 3951171875
? 1975585938
? 987792969
? 493896485
? 246948243
? 123474122
? 61737061
? 30868531
? 15434266
? 7717133
? 3858567
? 1929284
? 964642
? 482321
? 241161
? 120581
? 60291
? 3...

result:

ok Correct guess

Test #11:

score: 0
Accepted
time: 1ms
memory: 3584kb

input:

2
5
5
4
4
4
4
4
4
4
4
4
4
3
3
3
3
3
3
3
3
3
2
3
3
3
2
3
3
2
2
2
3
3
2
3
2
3
3
2
3
3
6
6
6
6
5
5
5
5
5
5
5
5
5
4
4
4
4
4
4
4
4
4
4
3
3
4
4
3
3
4
4
3
4
3
3
4
4
4
4
3
4
4
4
4
3
3
3
3
4
4
4
3

output:

? 1011500000000
? 505750000000
? 252875000000
? 126437500000
? 63218750000
? 31609375000
? 15804687500
? 7902343750
? 3951171875
? 1975585938
? 987792969
? 493896485
? 246948243
? 123474122
? 61737061
? 30868531
? 15434266
? 7717133
? 3858567
? 1929284
? 964642
? 482321
? 723482
? 602902
? 542612
? ...

result:

ok Correct guess

Test #12:

score: 0
Accepted
time: 1ms
memory: 3584kb

input:

3
4
4
4
4
4
4
4
4
4
3
3
3
3
3
3
3
4
3
4
3
3
4
4
3
3
3
3
4
3
4
4
3
4
3
3
4
3
4
3
4
4
5
5
5
5
5
5
5
5
4
5
5
5
5
5
5
4
4
4
4
5
4
4
4
5
4
4
4
4
5
4
4
4
5
5
5
5
5
5
5
4
5
5
4
5
4
4
5
5
4
5
5
4

output:

? 1011500000000
? 505750000000
? 252875000000
? 126437500000
? 63218750000
? 31609375000
? 15804687500
? 7902343750
? 3951171875
? 1975585938
? 2963378907
? 3457275391
? 3704223633
? 3827697754
? 3889434815
? 3920303345
? 3935737610
? 3928020478
? 3931879044
? 3929949761
? 3930914403
? 3931396724
? ...

result:

ok Correct guess

Test #13:

score: 0
Accepted
time: 1ms
memory: 3584kb

input:

30
40
39
38
37
36
35
34
34
33
32
31
31
31
31
30
30
31
31
30
30
30
30
30
30
30
31
31
30
31
30
30
30
30
31
31
30
31
30
30
31
31
51
50
49
48
47
46
45
44
43
42
41
40
39
38
37
36
35
34
34
33
32
31
32
32
32
31
31
32
32
31
31
32
31
31
32
31
31
32
31
32
31
31
32
31
32
31
31
32
31
31
32
31

output:

? 1011500000000
? 505750000000
? 252875000000
? 126437500000
? 63218750000
? 31609375000
? 15804687500
? 7902343750
? 3951171875
? 1975585938
? 987792969
? 493896485
? 246948243
? 123474122
? 61737061
? 92605592
? 108039857
? 100322725
? 96464159
? 98393442
? 99358084
? 99840405
? 100081565
? 100202...

result:

ok Correct guess

Test #14:

score: 0
Accepted
time: 0ms
memory: 3584kb

input:

1
6
6
6
6
6
6
5
5
5
5
5
5
5
4
4
4
4
4
4
4
3
3
3
3
3
3
3
2
2
2
2
2
2
2
2
2
1
2
2
1
1
8
8
8
8
7
7
7
7
7
7
7
6
6
6
6
6
6
5
5
5
5
5
5
5
4
4
4
4
4
4
4
3
3
3
3
3
3
3
2
2
3
2
3
2
3
2
2
3
2
2
2

output:

? 1011500000000
? 505750000000
? 252875000000
? 126437500000
? 63218750000
? 31609375000
? 15804687500
? 7902343750
? 3951171875
? 1975585938
? 987792969
? 493896485
? 246948243
? 123474122
? 61737061
? 30868531
? 15434266
? 7717133
? 3858567
? 1929284
? 964642
? 482321
? 241161
? 120581
? 60291
? 3...

result:

ok Correct guess

Test #15:

score: 0
Accepted
time: 0ms
memory: 3584kb

input:

2
4
4
4
4
4
4
4
4
3
3
3
3
3
3
3
3
3
3
3
2
3
2
3
2
2
2
3
3
3
3
2
3
2
2
3
3
2
2
2
2
5
5
5
5
5
5
5
5
4
4
4
4
4
4
4
4
4
4
4
3
4
3
3
4
4
3
4
4
3
3
4
4
4
3
3
3
4
3
4
4
3
4
3
3
4
4
4
3
3
4
4
3

output:

? 1011500000000
? 505750000000
? 252875000000
? 126437500000
? 63218750000
? 31609375000
? 15804687500
? 7902343750
? 3951171875
? 1975585938
? 987792969
? 493896485
? 246948243
? 123474122
? 61737061
? 30868531
? 15434266
? 7717133
? 3858567
? 1929284
? 2893926
? 2411605
? 2652766
? 2532186
? 25924...

result:

ok Correct guess

Test #16:

score: 0
Accepted
time: 0ms
memory: 3584kb

input:

3
4
4
4
4
4
4
4
4
4
3
3
3
3
4
3
3
3
4
3
4
3
4
3
4
3
3
3
4
3
3
4
3
4
3
4
3
4
3
4
3
3
5
5
5
5
5
5
5
5
5
4
4
4
4
4
4
4
5
5
4
5
4
4
4
4
5
5
5
4
4
4
5
4
5
5
4
4
4
5
5
4
5
5
4
4
4
4
4
4
4
4
4

output:

? 1011500000000
? 505750000000
? 252875000000
? 126437500000
? 63218750000
? 31609375000
? 15804687500
? 7902343750
? 3951171875
? 1975585938
? 2963378907
? 3457275391
? 3704223633
? 3827697754
? 3765960694
? 3796829224
? 3812263489
? 3819980622
? 3816122056
? 3818051339
? 3817086698
? 3817569019
? ...

result:

ok Correct guess

Test #17:

score: 0
Accepted
time: 0ms
memory: 3456kb

input:

29
40
39
38
37
36
35
34
33
32
32
31
30
30
29
29
30
30
29
29
29
29
29
30
29
29
29
29
30
29
29
30
29
29
30
30
30
30
30
29
30
29
51
50
49
48
47
46
45
44
43
42
41
40
39
38
37
36
35
34
33
33
32
31
30
31
31
31
30
30
31
31
30
30
31
30
30
31
30
30
31
30
31
30
30
31
30
30
31
31
31
30
31
31

output:

? 1011500000000
? 505750000000
? 252875000000
? 126437500000
? 63218750000
? 31609375000
? 15804687500
? 7902343750
? 3951171875
? 1975585938
? 987792969
? 493896485
? 246948243
? 123474122
? 185211183
? 216079713
? 200645448
? 192928316
? 196786882
? 198716165
? 199680807
? 200163128
? 200404288
? ...

result:

ok Correct guess

Test #18:

score: 0
Accepted
time: 0ms
memory: 3584kb

input:

4
5
5
5
5
5
4
5
5
5
5
4
4
5
4
4
5
5
5
5
5
4
4
5
5
5
5
5
5
5
5
5
4
5
5
5
5
5
4
5
4
5
6
6
6
6
6
6
6
6
5
5
5
6
5
6
5
6
5
5
6
5
5
5
5
6
6
6
6
5
6
6
6
6
6
5
5
5
6
6
6
6
6
6
6
6
5
6
6
5
5
6
5
5

output:

? 1011500000000
? 505750000000
? 252875000000
? 126437500000
? 63218750000
? 31609375000
? 47414062500
? 39511718750
? 35560546875
? 33584960938
? 32597167969
? 33091064454
? 33338012696
? 33214538575
? 33276275636
? 33307144166
? 33291709901
? 33283992769
? 33280134203
? 33278204920
? 33277240278
?...

result:

ok Correct guess

Test #19:

score: 0
Accepted
time: 0ms
memory: 3456kb

input:

3
4
4
4
4
4
4
4
4
4
4
3
3
4
3
4
4
4
4
4
4
4
4
4
3
3
3
4
4
4
3
4
3
4
4
3
3
4
3
3
4
4
5
5
5
5
5
5
5
5
5
5
4
5
4
5
5
5
4
5
5
4
5
4
4
5
5
5
4
5
5
4
5
5
5
5
4
5
4
5
5
4
4
5
5
4
5
5
5
5
4
4
5
5

output:

? 1011500000000
? 505750000000
? 252875000000
? 126437500000
? 63218750000
? 31609375000
? 15804687500
? 7902343750
? 3951171875
? 1975585938
? 987792969
? 1481689454
? 1728637696
? 1605163575
? 1666900636
? 1636032106
? 1620597841
? 1612880708
? 1609022142
? 1607092859
? 1606128217
? 1605645896
? 1...

result:

ok Correct guess

Test #20:

score: 0
Accepted
time: 0ms
memory: 3584kb

input:

3
4
4
4
4
4
4
4
4
3
4
4
4
4
4
3
4
3
3
4
4
3
3
4
3
4
4
4
3
3
4
4
3
4
3
4
4
3
3
4
4
3
5
5
5
5
5
5
5
5
5
4
4
4
5
5
5
4
4
4
5
5
4
4
4
5
5
4
4
4
4
5
4
5
4
4
5
4
5
5
5
4
5
4
4
4
5
4
5
5
5
5
4
5

output:

? 1011500000000
? 505750000000
? 252875000000
? 126437500000
? 63218750000
? 31609375000
? 15804687500
? 7902343750
? 3951171875
? 5926757813
? 4938964844
? 4445068360
? 4198120118
? 4074645997
? 4012908936
? 4043777467
? 4028343202
? 4036060335
? 4039918901
? 4037989618
? 4037024977
? 4037507298
? ...

result:

ok Correct guess

Test #21:

score: 0
Accepted
time: 0ms
memory: 3584kb

input:

3
4
4
4
4
4
4
4
4
4
3
4
4
3
4
3
3
3
4
4
4
3
3
3
3
4
4
4
4
4
4
3
4
4
4
4
4
3
3
4
3
3
5
5
5
5
5
5
5
5
5
4
5
5
4
5
5
5
4
5
5
5
5
5
4
4
5
5
4
5
5
4
4
4
4
5
5
5
4
5
5
5
5
4
4
4
4
5
5
4
5
5
4
5

output:

? 1011500000000
? 505750000000
? 252875000000
? 126437500000
? 63218750000
? 31609375000
? 15804687500
? 7902343750
? 3951171875
? 1975585938
? 2963378907
? 2469482423
? 2222534181
? 2346008302
? 2284271242
? 2315139772
? 2330574037
? 2338291170
? 2334432604
? 2332503321
? 2331538679
? 2332021000
? ...

result:

ok Correct guess

Test #22:

score: 0
Accepted
time: 0ms
memory: 3712kb

input:

3
4
4
4
4
4
4
4
4
4
3
4
3
3
4
3
4
3
4
3
3
4
4
4
4
3
3
3
3
3
4
3
4
3
4
4
3
3
3
3
3
5
5
5
5
5
5
5
5
5
4
5
4
5
5
4
4
5
4
4
5
4
5
4
5
4
4
4
4
5
4
5
4
4
4
5
4
5
4
5
5
5
4
5
5
5
4
4
4
5
5
4
4

output:

? 1011500000000
? 505750000000
? 252875000000
? 126437500000
? 63218750000
? 31609375000
? 15804687500
? 7902343750
? 3951171875
? 1975585938
? 2963378907
? 2469482423
? 2716430665
? 2839904786
? 2778167726
? 2809036256
? 2793601991
? 2801319124
? 2797460558
? 2799389841
? 2800354483
? 2799872162
? ...

result:

ok Correct guess

Test #23:

score: 0
Accepted
time: 1ms
memory: 3584kb

input:

4
5
5
5
5
5
5
4
4
4
5
4
5
4
5
5
5
4
5
4
4
5
5
5
4
4
5
4
5
5
5
4
4
4
4
5
4
4
4
4
4
6
6
6
6
6
6
6
6
5
5
6
6
6
6
5
6
6
5
6
6
5
6
6
5
6
5
6
5
5
6
6
6
5
5
6
6
5
6
5
5
6
5
6
6
5
6
6
6
6
6
6
5

output:

? 1011500000000
? 505750000000
? 252875000000
? 126437500000
? 63218750000
? 31609375000
? 15804687500
? 23707031250
? 27658203125
? 29633789063
? 28645996094
? 29139892579
? 28892944337
? 29016418458
? 28954681398
? 28923812868
? 28908378603
? 28916095736
? 28912237170
? 28914166453
? 28915131095
?...

result:

ok Correct guess

Test #24:

score: 0
Accepted
time: 0ms
memory: 3584kb

input:

3
4
4
4
4
4
4
4
4
3
3
3
4
3
3
3
4
4
4
3
3
3
3
4
4
3
3
3
4
3
3
4
4
4
3
3
4
4
4
3
4
4
5
5
5
5
5
5
5
5
4
4
4
4
5
4
5
4
5
5
5
5
5
5
5
4
5
5
4
4
5
4
4
5
5
4
5
5
5
4
5
4
4
5
4
5
4
5
5
5
5
4
5
5

output:

? 1011500000000
? 505750000000
? 252875000000
? 126437500000
? 63218750000
? 31609375000
? 15804687500
? 7902343750
? 3951171875
? 5926757813
? 6914550782
? 7408447266
? 7161499024
? 7284973145
? 7346710206
? 7377578736
? 7362144471
? 7354427339
? 7350568773
? 7352498056
? 7353462698
? 7353945019
? ...

result:

ok Correct guess

Test #25:

score: 0
Accepted
time: 0ms
memory: 3712kb

input:

3
5
4
4
4
4
4
4
4
4
4
4
4
4
4
4
3
4
3
4
4
4
3
3
3
4
3
4
3
3
4
4
3
4
4
4
3
3
4
4
3
3
6
6
6
5
5
5
5
5
5
5
5
5
4
5
5
5
5
4
4
5
5
5
4
4
4
5
5
5
5
5
4
4
5
4
5
5
5
5
5
5
5
5
4
4
5
4
5
4
4
5
5
4

output:

? 1011500000000
? 505750000000
? 252875000000
? 126437500000
? 63218750000
? 31609375000
? 15804687500
? 7902343750
? 3951171875
? 1975585938
? 987792969
? 493896485
? 246948243
? 123474122
? 61737061
? 30868531
? 46302796
? 38585664
? 42444230
? 40514947
? 39550306
? 39067985
? 39309146
? 39429726
...

result:

ok Correct guess

Test #26:

score: 0
Accepted
time: 1ms
memory: 3456kb

input:

4
5
5
5
5
5
5
4
5
5
5
5
4
4
5
5
4
5
5
5
4
4
5
4
5
5
5
4
5
5
5
5
4
5
4
4
4
5
4
4
5
4
6
6
6
6
6
6
6
6
6
5
5
6
6
6
6
5
5
5
5
6
5
6
6
6
5
6
6
5
5
5
5
5
5
5
6
6
5
5
5
6
6
6
6
5
5
5
5
5
5
6
5
6

output:

? 1011500000000
? 505750000000
? 252875000000
? 126437500000
? 63218750000
? 31609375000
? 15804687500
? 23707031250
? 19755859375
? 17780273438
? 16792480469
? 16298583985
? 16545532227
? 16669006348
? 16607269288
? 16576400758
? 16591835023
? 16584117891
? 16580259325
? 16578330042
? 16579294684
?...

result:

ok Correct guess

Test #27:

score: 0
Accepted
time: 0ms
memory: 3584kb

input:

3
4
4
4
4
4
4
4
4
3
4
4
3
3
4
3
4
3
4
4
3
4
4
3
4
3
4
3
4
3
3
4
3
3
3
3
3
4
3
4
3
4
5
5
5
5
5
5
5
5
4
5
4
5
5
5
4
4
4
4
4
4
5
5
5
5
4
4
5
4
4
4
5
5
5
5
4
5
4
5
4
5
4
5
4
5
5
5
5
4
5
5
4
4

output:

? 1011500000000
? 505750000000
? 252875000000
? 126437500000
? 63218750000
? 31609375000
? 15804687500
? 7902343750
? 3951171875
? 5926757813
? 4938964844
? 4445068360
? 4692016602
? 4815490723
? 4753753663
? 4784622193
? 4769187928
? 4776905061
? 4773046495
? 4771117212
? 4772081854
? 4771599533
? ...

result:

ok Correct guess

Test #28:

score: 0
Accepted
time: 0ms
memory: 3584kb

input:

3
4
4
4
4
4
4
4
4
4
4
4
3
3
3
4
4
3
3
4
3
4
3
3
3
4
3
3
3
3
3
3
3
4
4
4
4
3
3
3
3
6
5
5
5
5
5
5
5
5
5
5
4
5
5
5
5
4
4
4
4
4
5
4
5
4
5
4
4
4
4
4
4
5
5
5
4
5
4
4
5
5
4
5
4
4
4
4
5
4
5
4
5

output:

? 1011500000000
? 505750000000
? 252875000000
? 126437500000
? 63218750000
? 31609375000
? 15804687500
? 7902343750
? 3951171875
? 1975585938
? 987792969
? 493896485
? 740844727
? 864318848
? 926055909
? 895187379
? 879753114
? 887470247
? 891328813
? 889399530
? 890364172
? 889881851
? 890123012
? ...

result:

ok Correct guess

Test #29:

score: 0
Accepted
time: 1ms
memory: 3584kb

input:

3
5
5
5
4
4
4
4
4
4
4
4
4
4
3
3
4
4
4
3
4
4
4
4
3
4
3
4
3
4
4
3
3
4
3
4
4
3
4
3
3
3
6
6
6
6
5
5
5
5
5
5
5
5
5
5
4
4
4
4
4
4
4
4
4
5
4
4
5
5
4
4
5
4
5
5
5
5
5
4
4
5
5
4
4
4
5
4
5
5
4
5
4
5

output:

? 1011500000000
? 505750000000
? 252875000000
? 126437500000
? 63218750000
? 31609375000
? 15804687500
? 7902343750
? 3951171875
? 1975585938
? 987792969
? 493896485
? 246948243
? 123474122
? 185211183
? 216079713
? 200645448
? 192928316
? 189069750
? 190999033
? 190034392
? 189552071
? 189310911
? ...

result:

ok Correct guess

Test #30:

score: 0
Accepted
time: 0ms
memory: 3584kb

input:

3
5
5
4
4
4
4
4
4
4
4
4
4
3
4
4
4
4
4
3
3
4
3
4
4
4
4
4
3
4
4
3
4
4
4
4
3
3
3
4
4
3
6
6
6
6
5
5
5
5
5
5
5
5
5
4
5
5
4
5
5
4
5
4
4
4
5
4
4
5
5
5
5
4
4
5
5
4
4
4
5
5
4
4
4
4
5
4
5
4
4
5
4
4

output:

? 1011500000000
? 505750000000
? 252875000000
? 126437500000
? 63218750000
? 31609375000
? 15804687500
? 7902343750
? 3951171875
? 1975585938
? 987792969
? 493896485
? 246948243
? 370422364
? 308685304
? 277816774
? 262382509
? 254665376
? 250806810
? 252736093
? 253700735
? 253218414
? 253459575
? ...

result:

ok Correct guess

Test #31:

score: 0
Accepted
time: 1ms
memory: 3584kb

input:

3
4
4
4
4
4
4
4
4
4
3
4
4
3
4
4
4
4
3
3
4
3
4
4
4
4
4
4
3
3
4
4
4
3
3
4
4
4
3
3
4
4
5
5
5
5
5
5
5
5
5
5
4
4
4
5
5
5
4
4
5
4
4
4
5
4
4
5
4
4
4
4
4
5
4
5
5
4
5
5
4
5
4
5
4
5
5
5
4
5
4
5
5
4

output:

? 1011500000000
? 505750000000
? 252875000000
? 126437500000
? 63218750000
? 31609375000
? 15804687500
? 7902343750
? 3951171875
? 1975585938
? 2963378907
? 2469482423
? 2222534181
? 2346008302
? 2284271242
? 2253402712
? 2237968447
? 2230251314
? 2234109881
? 2236039164
? 2235074523
? 2235556844
? ...

result:

ok Correct guess

Test #32:

score: 0
Accepted
time: 1ms
memory: 3584kb

input:

3
4
4
4
4
4
4
4
4
4
4
3
4
3
4
4
3
3
3
3
3
3
3
3
3
4
3
3
4
3
4
4
4
3
3
3
4
4
4
3
4
4
5
5
5
5
5
5
5
5
5
5
4
5
4
4
5
4
4
4
4
4
4
5
4
4
4
5
4
5
4
4
4
5
4
5
5
5
4
4
4
4
4
4
5
4
4
5
5
5
4
5
5
5

output:

? 1011500000000
? 505750000000
? 252875000000
? 126437500000
? 63218750000
? 31609375000
? 15804687500
? 7902343750
? 3951171875
? 1975585938
? 987792969
? 1481689454
? 1234741212
? 1358215333
? 1296478273
? 1265609743
? 1281044008
? 1288761141
? 1292619707
? 1294548990
? 1295513632
? 1295995953
? 1...

result:

ok Correct guess

Test #33:

score: 0
Accepted
time: 0ms
memory: 3584kb

input:

3
4
4
4
4
4
4
4
4
3
3
4
4
3
3
4
3
4
3
3
3
3
4
4
3
3
3
4
3
4
4
3
3
4
4
3
3
4
4
4
4
3
5
5
5
5
5
5
5
5
4
4
4
5
5
5
5
5
4
4
5
4
4
5
5
5
4
5
4
5
4
5
4
4
5
5
4
4
4
5
5
4
4
5
4
5
4
4
4
4
4
5
5
4

output:

? 1011500000000
? 505750000000
? 252875000000
? 126437500000
? 63218750000
? 31609375000
? 15804687500
? 7902343750
? 3951171875
? 5926757813
? 6914550782
? 6420654298
? 6173706056
? 6297180177
? 6358917238
? 6328048708
? 6343482973
? 6335765841
? 6339624407
? 6341553690
? 6342518332
? 6343000653
? ...

result:

ok Correct guess

Test #34:

score: 0
Accepted
time: 0ms
memory: 3712kb

input:

3
4
4
4
4
4
4
4
4
4
4
3
4
4
3
4
3
4
4
4
4
4
3
3
4
3
4
3
4
4
3
4
4
4
3
3
3
3
3
3
4
3
5
5
5
5
5
5
5
5
5
5
4
5
5
4
4
4
5
4
4
4
5
5
5
5
4
4
5
4
4
5
5
5
4
4
4
4
5
5
5
5
4
5
4
4
4
5
5
5
5
5
4
4

output:

? 1011500000000
? 505750000000
? 252875000000
? 126437500000
? 63218750000
? 31609375000
? 15804687500
? 7902343750
? 3951171875
? 1975585938
? 987792969
? 1481689454
? 1234741212
? 1111267091
? 1173004152
? 1142135622
? 1157569887
? 1149852755
? 1145994189
? 1144064906
? 1143100264
? 1142617943
? 1...

result:

ok Correct guess

Test #35:

score: 0
Accepted
time: 0ms
memory: 3584kb

input:

3
4
4
4
4
4
4
4
4
3
3
4
3
4
3
3
4
3
4
4
3
4
3
3
4
4
3
4
3
4
3
4
4
3
3
3
3
3
4
3
4
3
5
5
5
5
5
5
5
5
4
4
5
5
4
4
4
5
5
4
4
5
5
4
5
5
4
4
5
5
4
5
4
4
5
5
5
5
4
5
4
4
4
4
4
4
4
4
4
4
5
4
5
5

output:

? 1011500000000
? 505750000000
? 252875000000
? 126437500000
? 63218750000
? 31609375000
? 15804687500
? 7902343750
? 3951171875
? 5926757813
? 6914550782
? 6420654298
? 6667602540
? 6544128419
? 6605865480
? 6636734010
? 6621299745
? 6629016878
? 6625158312
? 6623229029
? 6624193671
? 6623711350
? ...

result:

ok Correct guess

Test #36:

score: 0
Accepted
time: 0ms
memory: 3584kb

input:

3
4
4
4
4
4
4
4
4
4
3
4
4
3
3
4
4
4
4
4
3
3
3
4
4
3
4
3
3
4
4
3
3
4
4
4
3
3
4
4
3
3
5
5
5
5
5
5
5
5
5
5
4
4
5
4
5
4
4
4
4
4
5
5
5
4
5
5
5
4
5
4
5
4
4
4
4
4
4
5
4
5
5
4
4
4
4
5
5
4
5
4
4

output:

? 1011500000000
? 505750000000
? 252875000000
? 126437500000
? 63218750000
? 31609375000
? 15804687500
? 7902343750
? 3951171875
? 1975585938
? 2963378907
? 2469482423
? 2222534181
? 2346008302
? 2407745363
? 2376876833
? 2361442568
? 2353725435
? 2349866869
? 2347937586
? 2348902228
? 2349384549
? ...

result:

ok Correct guess

Test #37:

score: 0
Accepted
time: 0ms
memory: 3456kb

input:

4
6
5
5
5
5
5
5
5
5
4
4
4
5
4
5
5
5
4
5
4
5
5
4
5
4
5
4
5
4
5
5
4
5
4
5
4
4
5
4
5
5
7
7
7
7
6
6
6
6
6
6
6
6
5
5
5
6
5
6
5
6
5
6
6
5
5
6
5
6
6
6
6
5
6
6
5
5
6
5
5
6
5
5
6
6
6
6
5
6
5
5
6
5

output:

? 1011500000000
? 505750000000
? 252875000000
? 126437500000
? 63218750000
? 31609375000
? 15804687500
? 7902343750
? 3951171875
? 1975585938
? 2963378907
? 3457275391
? 3704223633
? 3580749512
? 3642486573
? 3611618043
? 3596183778
? 3588466645
? 3592325212
? 3590395929
? 3591360571
? 3590878250
? ...

result:

ok Correct guess

Test #38:

score: 0
Accepted
time: 0ms
memory: 3712kb

input:

3
4
4
4
4
4
4
4
4
4
4
3
4
4
3
3
4
4
3
4
4
3
4
4
3
3
4
3
3
3
3
3
4
3
3
4
3
4
3
4
4
3
6
5
5
5
5
5
5
5
5
5
5
4
4
5
5
5
4
4
5
4
5
5
5
4
5
5
4
4
4
4
4
4
5
5
5
4
4
5
4
4
4
5
4
4
5
5
4
4
5
5
4
4

output:

? 1011500000000
? 505750000000
? 252875000000
? 126437500000
? 63218750000
? 31609375000
? 15804687500
? 7902343750
? 3951171875
? 1975585938
? 987792969
? 1481689454
? 1234741212
? 1111267091
? 1173004152
? 1203872682
? 1188438417
? 1180721285
? 1184579851
? 1182650568
? 1181685927
? 1182168248
? 1...

result:

ok Correct guess

Test #39:

score: 0
Accepted
time: 0ms
memory: 3584kb

input:

7
9
9
9
8
8
8
8
8
7
8
7
8
8
7
7
8
8
8
7
8
7
7
7
8
7
8
7
7
8
8
7
7
7
8
8
7
8
8
7
8
8
11
11
11
11
11
10
10
10
10
10
9
9
9
9
8
9
9
8
9
8
8
9
9
9
8
9
9
9
9
9
8
9
9
8
8
8
9
8
8
8
9
9
8
8
9
9
9
9
8
9
9
9

output:

? 1011500000000
? 505750000000
? 252875000000
? 126437500000
? 63218750000
? 31609375000
? 15804687500
? 7902343750
? 3951171875
? 5926757813
? 4938964844
? 5432861329
? 5185913087
? 5062438966
? 5124176027
? 5155044557
? 5139610292
? 5131893160
? 5128034594
? 5129963877
? 5128999236
? 5129481557
? ...

result:

ok Correct guess

Test #40:

score: 0
Accepted
time: 0ms
memory: 3584kb

input:

4
5
5
5
5
5
5
4
4
4
4
4
5
5
4
4
5
5
4
4
4
5
5
4
4
5
5
4
5
4
4
4
5
5
4
5
4
5
5
5
5
4
6
6
6
6
6
6
6
6
5
5
6
5
6
5
6
5
5
5
6
6
5
5
5
6
5
5
6
6
6
5
6
5
6
6
5
5
5
6
6
5
5
6
5
6
6
5
5
5
6
6
6
5

output:

? 1011500000000
? 505750000000
? 252875000000
? 126437500000
? 63218750000
? 31609375000
? 15804687500
? 23707031250
? 27658203125
? 29633789063
? 30621582032
? 31115478516
? 30868530274
? 30745056153
? 30806793214
? 30837661744
? 30822227479
? 30814510347
? 30818368913
? 30820298196
? 30821262838
?...

result:

ok Correct guess

Test #41:

score: 0
Accepted
time: 0ms
memory: 3712kb

input:

3
4
4
4
4
4
4
4
4
3
4
4
3
4
4
4
3
3
4
4
3
3
4
4
4
4
3
4
3
3
4
4
4
3
3
3
4
4
3
3
4
3
5
5
5
5
5
5
5
5
4
5
5
5
5
5
5
4
5
4
5
4
5
5
5
4
4
5
5
4
5
4
5
5
4
4
4
5
4
5
4
5
4
4
5
5
4
4
5
5
5
4
5
4

output:

? 1011500000000
? 505750000000
? 252875000000
? 126437500000
? 63218750000
? 31609375000
? 15804687500
? 7902343750
? 3951171875
? 5926757813
? 4938964844
? 4445068360
? 4692016602
? 4568542481
? 4506805421
? 4475936891
? 4491371156
? 4499088289
? 4495229723
? 4493300440
? 4494265082
? 4494747403
? ...

result:

ok Correct guess

Test #42:

score: 0
Accepted
time: 1ms
memory: 3456kb

input:

3
5
4
4
4
4
4
4
4
4
4
4
4
4
3
4
3
4
4
3
3
4
4
3
3
4
4
4
4
3
4
3
3
4
3
4
4
3
4
4
3
4
6
6
6
5
5
5
5
5
5
5
5
5
4
5
5
5
5
4
4
5
5
5
4
4
4
5
5
5
5
5
4
4
5
4
5
5
5
4
5
5
5
4
5
4
4
4
4
4
5
5
5
5

output:

? 1011500000000
? 505750000000
? 252875000000
? 126437500000
? 63218750000
? 31609375000
? 15804687500
? 7902343750
? 3951171875
? 1975585938
? 987792969
? 493896485
? 246948243
? 123474122
? 185211183
? 154342653
? 169776918
? 162059786
? 158201220
? 160130503
? 161095145
? 160612824
? 160371664
? ...

result:

ok Correct guess

Extra Test:

score: 0
Extra Test Passed