QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#278136#5556. Diabolic Doofenshmirtzjzh#AC ✓4ms3788kbC++201.2kb2023-12-07 12:48:372023-12-07 12:48:37

Judging History

你现在查看的是最新测评结果

  • [2023-12-07 12:48:37]
  • 评测
  • 测评结果:AC
  • 用时:4ms
  • 内存:3788kb
  • [2023-12-07 12:48:37]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;

typedef long long ll;

ll glb_lst;

ll ask(ll x) {
    ll ret;
    printf("? %lld\n", x);
    fflush(stdout);
    scanf("%lld", &ret);
    glb_lst = ret;
    return ret;
}

ll addask(ll &cur, ll x) {
    cur += x;
    return ask(cur);
}


void solve()
{
    ll cur = 0;
    ll lst, tmp, ans;
    vector<pair<ll, ll>> pfactors;

    lst = addask(cur, 1e12l);
    ans = cur - lst;
    tmp = ans;


    for (ll i=2; i*i <= tmp; i++) if (tmp % i == 0) {
        ll cc = 0;
        for (; tmp%i == 0; tmp/=i) cc++;
        pfactors.emplace_back(i, cc);
    }
    if (tmp > 1) pfactors.emplace_back(tmp, 1);


    for (auto [p, a]: pfactors) {
        ll L = 0, R = a, M, maxM=0;
        vector<ll> pp;
        for (ll b=1, i=0; i<=a; i++, b*=p) pp.push_back(b);
        for (; L<=R; ) {
            M = (L+R)/2;
            if (addask(cur, ans/pp[M]) == lst) {
                maxM = M;
                L = M+1;
            }
            else {
                R = M-1;
            }
            lst = glb_lst;
        }
        ans /= pp[maxM];
    }

    printf("! %lld\n", ans);
}



int main()
{
    solve();
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 3668kb

input:

22
22
1
1
15
15
21
21
21
21
21
21
21

output:

? 1000000000000
? 1999999999978
? 2499999999967
? 3499999999945
? 3833333333271
? 4833333333249
? 4976190476103
? 5976190476081
? 5993139628623
? 6010088781165
? 6010341753591
? 6010594726017
? 6010594726059
! 42

result:

ok Queries used: 14

Test #2:

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

input:

428
428
428
428
1192
1192
1192
1192
709
709
709
709
709

output:

? 1000000000000
? 1499999999786
? 1749999999679
? 1999999999572
? 2035714285271
? 2285714285164
? 2291811846137
? 2297909407110
? 2297941331513
? 2304038892486
? 2304042993065
? 2304047093644
? 2304047094981
! 1337

result:

ok Queries used: 14

Test #3:

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

input:

0
0
0
0
0
0
0
0
0

output:

? 1000000000000
? 1015625000000
? 1017578125000
? 1018066406250
? 1018310546875
? 1018310562500
? 1018310562625
? 1018310562630
? 1018310562631
! 1

result:

ok Queries used: 10

Test #4:

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

input:

0
0
0
0
1
1
1
1
1

output:

? 1000000000000
? 1015625000000
? 1017578125000
? 1018066406250
? 1018310546875
? 1018310578125
? 1018310578375
? 1018310578385
? 1018310578387
! 2

result:

ok Queries used: 10

Test #5:

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

input:

1
1
1
2
2
2
2
2
2
2
2
2
2
2
2
2

output:

? 1000000000000
? 1333333333333
? 1444444444444
? 1481481481481
? 1592592592592
? 1608465608465
? 1624338624338
? 1625781625781
? 1627224627224
? 1627335627335
? 1627446627446
? 1627449627449
? 1627452627452
? 1627452657155
? 1627452686858
? 1627452686861
! 3

result:

ok Queries used: 17

Test #6:

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

input:

0
0
0
2
2
2
2
2
2

output:

? 1000000000000
? 1015625000000
? 1017578125000
? 1018066406250
? 1019042968750
? 1019043031250
? 1019043031750
? 1019043031770
? 1019043031774
! 4

result:

ok Queries used: 10

Test #7:

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

input:

0
0
0
0
0
0
0
0
1

output:

? 1000000000000
? 1015625000000
? 1017578125000
? 1018066406250
? 1018310546875
? 1018310562500
? 1018310562625
? 1018310562630
? 1018310562631
! 5

result:

ok Queries used: 10

Test #8:

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

input:

4
4
1
1
5
5
5
5
5
5
5

output:

? 1000000000000
? 1499999999998
? 1749999999997
? 2249999999995
? 2416666666661
? 2916666666659
? 2932795698917
? 2932922699171
? 2932923699173
? 2932924699175
? 2932924699181
! 6

result:

ok Queries used: 12

Test #9:

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

input:

1
1
1
1
1
6
6
6
6
6
6
6
6
6
6
6

output:

? 1000000000000
? 1333333333333
? 1444444444444
? 1481481481481
? 1518518518518
? 1523809523809
? 1560846560846
? 1564213564213
? 1567580567580
? 1567839567839
? 1568098568098
? 1568105568105
? 1568112568112
? 1568112637419
? 1568112706726
? 1568112706733
! 7

result:

ok Queries used: 17

Test #10:

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

input:

0
0
0
2
6
6
6
6
6

output:

? 1000000000000
? 1015625000000
? 1017578125000
? 1018066406250
? 1019042968750
? 1019043093750
? 1019043094750
? 1019043094790
? 1019043094798
! 8

result:

ok Queries used: 10

Test #11:

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

input:

1
1
4
4
4
4
4
4
4
4
4
4
4
4
4

output:

? 1000000000000
? 1333333333333
? 1444444444444
? 1777777777777
? 1825396825396
? 1873015873015
? 1877344877344
? 1881673881673
? 1882006882006
? 1882339882339
? 1882348882348
? 1882357882357
? 1882357971466
? 1882358060575
? 1882358060584
! 9

result:

ok Queries used: 16

Test #12:

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

input:

10
10
10
10
5
5
8
8
8
8
8

output:

? 1000000000000
? 1999999999990
? 2499999999985
? 2666666666650
? 2722222222205
? 2888888888870
? 2922222222203
? 3088888888868
? 3088896587453
? 3088904286038
? 3088904286053
! 15

result:

ok Queries used: 12

Test #13:

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

input:

0
0
8
8
8
8
8
8
8

output:

? 1000000000000
? 1015625000000
? 1017578125000
? 1025390625000
? 1029296875000
? 1029297125000
? 1029297127000
? 1029297127080
? 1029297127096
! 16

result:

ok Queries used: 10

Test #14:

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

input:

13
13
13
13
4
4
4
4
4

output:

? 1000000000000
? 1999999999987
? 2333333333316
? 2666666666645
? 2686274509782
? 3019607843111
? 3034100596734
? 3048593350357
? 3048593350374
! 17

result:

ok Queries used: 10

Test #15:

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

input:

201672501766
201672501766
600836250883
600836250883
68617918727
68617918727
182664704189
182664704189
182664704231

output:

? 1000000000000
? 1798327498234
? 2197491247351
? 2995818745585
? 3261927911663
? 4060255409897
? 4174302195359
? 4972629693593
? 4972629693635
! 798327498234

result:

ok Queries used: 10

Test #16:

score: 0
Accepted
time: 3ms
memory: 3680kb

input:

257016426713
257016426713
257016426714

output:

? 1000000000000
? 1742983573287
? 1742983573288
! 742983573287

result:

ok Queries used: 4

Test #17:

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

input:

16497137704
180414281420
180414281420
180414281420
180414281420
180414281420
180450534244
180450534244
180450606588

output:

? 1000000000000
? 1491751431148
? 2475254293444
? 3458757155740
? 3786591443172
? 4114425730604
? 4114461983428
? 4442296270860
? 4442296343204
! 327834287432

result:

ok Queries used: 10

Test #18:

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

input:

175134025754
175134025754
175134025754
175134025754
179768104261
179768104261
179768104350

output:

? 1000000000000
? 1824865974246
? 2237298961369
? 2649731948492
? 2654366026999
? 3066799014122
? 3066799014211
! 412432987123

result:

ok Queries used: 8

Test #19:

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

input:

19276575676
509638287838
509638287838
509638287838
836546095946
836546095946
976649442278
976649442278
976649442362

output:

? 1000000000000
? 1490361712162
? 2471085136486
? 3451808560810
? 3778716368918
? 4759439793242
? 4899543139574
? 5880266563898
? 5880266563982
! 980723424324

result:

ok Queries used: 10

Test #20:

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

input:

12765125676
506382562838
506382562838
506382562838
508514819586
508514819586
510125316934
510125316934
510126452210

output:

? 1000000000000
? 1493617437162
? 2480852311486
? 3468087185810
? 3470219442558
? 4457454316882
? 4459064814230
? 5446299688554
? 5446300823830
! 987234874324

result:

ok Queries used: 10

Test #21:

score: 0
Accepted
time: 4ms
memory: 3608kb

input:

23217805679
23217805679
23217805680

output:

? 1000000000000
? 1976782194321
? 1976782194322
! 976782194321

result:

ok Queries used: 4

Test #22:

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

input:

134024938036
134024938036
350518703527
350518703527
61860349539
61860349539
66725377977
66725377977
66725378511

output:

? 1000000000000
? 1432987530982
? 1649481296473
? 2082468827455
? 2226798004449
? 2659785535431
? 2664650563869
? 3097638094851
? 3097638095385
! 432987530982

result:

ok Queries used: 10

Test #23:

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

input:

450244186113
450244186113
528780730954
528780730954
535739665307
535739665307
535806782364
535806782364
535811311987

output:

? 1000000000000
? 1549755813887
? 1628292358728
? 2178048172615
? 2185007106968
? 2734762920855
? 2734830037912
? 3284585851799
? 3284590381422
! 549755813887

result:

ok Queries used: 10

Test #24:

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

input:

450244186112
450245234688
451318976512
485678714880
210800807936
210800807936

output:

? 1000000000000
? 1000001048576
? 1001074790400
? 1035434528768
? 1310312435712
? 1860068249600
! 549755813888

result:

ok Queries used: 7

Test #25:

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

input:

450244186111
83740310185
83740310185
83740310185
83941612204
83941612204
83941636783

output:

? 1000000000000
? 1183251937963
? 1733007751852
? 2282763565741
? 2282964867760
? 2832720681649
? 2832720706228
! 549755813889

result:

ok Queries used: 8

Test #26:

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

input:

1
333333333334
333333333334
333333333334
476190476191
476190476191
567099567100
567099567100
644022644023
644022644023
671049671050
671049671050
680950661149
680950661149
681051661048

output:

? 1000000000000
? 1333333333333
? 2333333333332
? 3333333333331
? 3476190476188
? 4476190476187
? 4567099567096
? 5567099567095
? 5644022644018
? 6644022644017
? 6671049671044
? 7671049671043
? 7680950661142
? 8680950661141
? 8681051661040
! 999999999999

result:

ok Queries used: 16

Test #27:

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

input:

0
15625000000
265625000000
265625000000
765625000000
765689000000
805689000000
805689000000
5689000000

output:

? 1000000000000
? 1015625000000
? 1265625000000
? 2265625000000
? 2765625000000
? 2765689000000
? 2805689000000
? 3805689000000
? 4005689000000
! 1000000000000

result:

ok Queries used: 10

Test #28:

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

input:

41038796800
71006334400
49211761600
49211761600
5622616000
24995569600
24995569600
83114430400
13371797440
13371797440
63187963840
63187963840
63187963840
71113263040
71113263040
77819285440

output:

? 1000000000000
? 1029967537600
? 1269707838400
? 2228669041600
? 2708149643200
? 2814700888000
? 3773662091200
? 4093315825600
? 4285108066240
? 5244069269440
? 5381063727040
? 6340024930240
? 6427203221440
? 6435128520640
? 6522306811840
? 6529012834240
! 87178291200

result:

ok Queries used: 17

Test #29:

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

input:

36238801600
76395518200
76395518200
76395518200
22853229400
22853229400
22853229400
38915916040
38915916040
38915916040
50389263640
50389263640
57690484840
57690484840
63868441240
63868441240
68592760840
68592760840
72819783640
72819783640
76311672040

output:

? 1000000000000
? 1120470149800
? 1602350749000
? 1843291048600
? 1870062193000
? 2111002492600
? 2191315925800
? 2207378612440
? 2287692045640
? 2368005478840
? 2379478826440
? 2459792259640
? 2467093480840
? 2547406914040
? 2553584870440
? 2633898303640
? 2638622623240
? 2718936056440
? 2723163079...

result:

ok Queries used: 22

Test #30:

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

input:

36238801600
156708951400
638589550600
638589550600
745674128200
745674128200
103166662600
295918902280
295918902280
295918902280
433599073480
433599073480
521213727880
521213727880
595349204680
595349204680
652041039880
652041039880
702765313480
702765313480
744667974280

output:

? 1000000000000
? 1120470149800
? 1602350749000
? 2566111947400
? 2673196525000
? 3636957723400
? 3958211456200
? 4150963695880
? 5114724894280
? 6078486092680
? 6216166263880
? 7179927462280
? 7267542116680
? 8231303315080
? 8305438791880
? 9269199990280
? 9325891825480
? 10289653023880
? 103403772...

result:

ok Queries used: 22

Test #31:

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

input:

1
10
10
10
10
10
10
10
10
10
10
10
10
10
10

output:

? 1000000000000
? 1333333333333
? 2333333333332
? 3333333333331
? 3476190476188
? 3619047619045
? 3632034632032
? 3645021645019
? 3646020646018
? 3647019647017
? 3647046647044
? 3647073647071
? 3647073914398
? 3647074181725
? 3647074181752
! 27

result:

ok Queries used: 16

Test #32:

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

input:

13
13
30
30
3
3
3
3
3

output:

? 1000000000000
? 1999999999987
? 2333333333316
? 3333333333303
? 3392156862714
? 4392156862701
? 4435635123570
? 4479113384439
? 4479113384490
! 51

result:

ok Queries used: 10

Test #33:

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

input:

50
50
50
50
50
50
50
50
14
14
14
14
14

output:

? 1000000000000
? 1999999999950
? 2499999999925
? 2599999999920
? 2619999999919
? 2639999999918
? 2642857142775
? 2645714285632
? 2645743740713
? 2648600883570
? 2648615687419
? 2648630491268
? 2648630491365
! 97

result:

ok Queries used: 14

Test #34:

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

input:

115
115
200
200
47
47
167
167
167

output:

? 1000000000000
? 1999999999885
? 2333333333180
? 3333333333065
? 3533333333042
? 4533333332927
? 4592156862332
? 5592156862217
? 5592156862472
! 255

result:

ok Queries used: 10

Test #35:

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

input:

69
69
69
69
189
189
189
189
189

output:

? 1000000000000
? 1999999999931
? 2018867924458
? 2037735848985
? 2037803964236
? 2056671888763
? 2056679016804
? 2056686144845
? 2056686145122
! 277

result:

ok Queries used: 10

Test #36:

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

input:

78
78
78
78
78
78
78
368
368
368
368

output:

? 1000000000000
? 1999999999922
? 2499999999883
? 2999999999844
? 3071428571267
? 3142857142690
? 3149350649183
? 3149574563200
? 3156068069693
? 3162561576186
? 3162561577027
! 841

result:

ok Queries used: 12

Test #37:

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

input:

1659
1659
1659
1659
1659
1659
1248
1248
1248

output:

? 1000000000000
? 1999999998341
? 2018867922838
? 2037735847335
? 2037779624422
? 2037823401509
? 2037823427770
? 2037867204857
? 2037867206524
! 1667

result:

ok Queries used: 10

Test #38:

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

input:

160
160
160
160
160
1626
1626
1626
1626
1626
1626
774
774
774

output:

? 1000000000000
? 1249999999960
? 1312499999950
? 1343749999945
? 1374999999940
? 1385416666605
? 1416666666600
? 1422916666599
? 1429166666598
? 1429254694767
? 1429342722936
? 1429342843029
? 1429430871198
? 1429430873397
! 2199

result:

ok Queries used: 15

Test #39:

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

input:

5230
5230
5230
5230
5230
5230
5230
5230
795
795
3861
3861
3861

output:

? 1000000000000
? 1999999994770
? 2499999992155
? 2666666657950
? 2722222213215
? 2777777768480
? 2788888879533
? 2799999990586
? 2801587292165
? 2812698403218
? 2812710929837
? 2823822040890
? 2823822047099
! 6209

result:

ok Queries used: 14

Test #40:

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

input:

1977
1977
1977
1977
7001
7001
5782
5782
5782

output:

? 1000000000000
? 1999999998023
? 2076923074794
? 2153846151565
? 2155297530372
? 2232220607143
? 2232710563046
? 2309633639817
? 2309633648138
! 8321

result:

ok Queries used: 10

Test #41:

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

input:

23149
3427
3427
3427
22111
22111
28096
28096
28096
28096
28096

output:

? 1000000000000
? 1333333325617
? 2333333302468
? 3333333279319
? 3385964857048
? 4385964833899
? 4391745180586
? 5391745157437
? 5394356123434
? 5396967089431
? 5396967119014
! 29583

result:

ok Queries used: 12

Test #42:

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

input:

30630
30630
30630
30630
30630
30630
30630
30630
11728
11728
11728

output:

? 1000000000000
? 1999999969370
? 2499999954055
? 2999999938740
? 3099999935677
? 3199999932614
? 3205882285375
? 3211764638136
? 3211764761863
? 3217647114624
? 3217647162167
! 47543

result:

ok Queries used: 12

Test #43:

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

input:

45388
45388
45388
45388
45388
22851
22851
3222
3222
28611
28611
28611

output:

? 1000000000000
? 1499999977306
? 1749999965959
? 1777777742476
? 1787037001315
? 1790123420928
? 1799382679767
? 1799681365536
? 1808940624375
? 1808953360632
? 1818212619471
? 1818212687082
! 67611

result:

ok Queries used: 13

Test #44:

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

input:

90910
90910
90910
90910
90910
154365
154365
116292
170682
170682
170682
170682
170682
170682
150102
150102
150102

output:

? 1000000000000
? 1999999909090
? 2499999863635
? 2555555414140
? 2574073930975
? 2580246769920
? 2598765286755
? 2602468990122
? 2602846919037
? 2621365435872
? 2624010938277
? 2626656440682
? 2626859940867
? 2627063441052
? 2627068941057
? 2627272441242
? 2627272631607
! 190365

result:

ok Queries used: 18

Test #45:

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

input:

174474
174474
174474
174474
174474
174474
174474
174474
174474
174474
174475

output:

? 1000000000000
? 1999999825526
? 2499999738289
? 2999999651052
? 3038461182803
? 3076922714554
? 3077104996695
? 3077287278836
? 3077287562323
? 3077287845810
? 3077287845811
! 283487

result:

ok Queries used: 12

Test #46:

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

input:

363879
363879
725114
725114
814256
814256
814256

output:

? 1000000000000
? 1999999636121
? 2012047824508
? 3012047460629
? 3012144350430
? 4012143986551
? 4012144843194
! 856643

result:

ok Queries used: 8

Test #47:

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

input:

1165759
1165759
1165759
1165759
1165759
1165759
770823
770823
770823
770823
770854

output:

? 1000000000000
? 1999998834241
? 2333331778988
? 2666664723735
? 2696967718712
? 2727270713689
? 2728248229656
? 2758551224633
? 2758552755010
? 2758554285387
? 2758554285418
! 1530377

result:

ok Queries used: 12

Test #48:

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

input:

1250125
1250125
1250125
1250125
2217815
2217815
2217815
2217815
2217815
2217815
2217840

output:

? 1000000000000
? 1999998749875
? 2333331666500
? 2399998249825
? 2413331566490
? 2479998149815
? 2483919713540
? 2487841277265
? 2487843696490
? 2487846115715
? 2487846115740
! 2419225

result:

ok Queries used: 12

Test #49:

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

input:

5233851
5233851
5233851
5233851
5233851
5233851
5233852

output:

? 1000000000000
? 1999994766149
? 2004400029436
? 2008805292723
? 2008813007720
? 2008820722717
? 2008820722718
! 7714997

result:

ok Queries used: 8

Test #50:

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

input:

9363325
9363325
5772372
5772372
5772372
5772372
5772372
5772372
5772372
5772372
5772375

output:

? 1000000000000
? 1999990636675
? 2333320848900
? 2533318976235
? 2573318601702
? 2613318227169
? 2614169283030
? 2615020338891
? 2615031111750
? 2615041884609
? 2615041884612
! 10772859

result:

ok Queries used: 12

Test #51:

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

input:

22475314
22475314
22475314
22475314
22475314
22475314
22475314
18765015
18765015
18765015
18765015
18765015
18765015
18765022

output:

? 1000000000000
? 1999977524686
? 2499966287029
? 2666629207810
? 2722183514737
? 2740701617046
? 2759219719355
? 2761865162542
? 2780383264851
? 2781188399734
? 2781993534617
? 2782019506710
? 2782045478803
? 2782045478810
! 25972093

result:

ok Queries used: 15

Test #52:

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

input:

6368755
6368755
6368755
6368755
6368755
6368755
47668620
47668620
47668620
47668620
47668627

output:

? 1000000000000
? 1999993631245
? 2333324841660
? 2666656052075
? 2733322294158
? 2799988536241
? 2809512285110
? 2876178527193
? 2876236347004
? 2876294166815
? 2876294166822
! 57819811

result:

ok Queries used: 12

Test #53:

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

input:

19901169
19901169
6877712
6877712
6877712
6877712
6877719

output:

? 1000000000000
? 1142854299833
? 1163262056952
? 1306116356785
? 1306207520984
? 1306298685183
? 1306298685190
! 91164199

result:

ok Queries used: 8

Test #54:

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

input:

71916195
71916195
71916195
71916195
71916195
71916195
71916195
71916195
72312722
72312722
72313383

output:

? 1000000000000
? 1999928083805
? 2199913700566
? 2399899317327
? 2428468691150
? 2457038064973
? 2457300169320
? 2457562273667
? 2457562670194
? 2457824774541
? 2457824775202
! 262104347

result:

ok Queries used: 12

Test #55:

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

input:

49061971
49061971
344163325
344163325
398145280
398145280
408811594
408811594
226274674
226274674
86646181
86646181
86646181

output:

? 1000000000000
? 1111105659781
? 1148140879708
? 1259246539489
? 1261956433630
? 1373062093411
? 1374400715818
? 1485506375599
? 1486651794772
? 1597757454553
? 1598503130122
? 1709608789903
? 1710051441934
! 442652031

result:

ok Queries used: 14

Test #56:

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

input:

728082625
728082625
472056000
625671975
625671975
625671975
380540100
380540100
380540100
380540100
380557725

output:

? 1000000000000
? 1999271917375
? 2332362556500
? 2532216939975
? 3531488857350
? 4530760774725
? 4552021879350
? 5551293796725
? 5552061876600
? 5552829956475
? 5552829974100
! 768079875

result:

ok Queries used: 12

Test #57:

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

input:

5899056
5899056
5899056
5899056
5899056
5899056
5899056
33517099
33517099
34294622
34294622
34483911

output:

? 1000000000000
? 1249998525236
? 1374997787854
? 1437497419163
? 1499997050472
? 1502013167611
? 1504029284750
? 1504056902793
? 1506073019932
? 1506073797455
? 1508089914594
? 1508090103883
! 2016117139

result:

ok Queries used: 13

Test #58:

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

input:

2313307396
2313307396
2313307396
2313307396
2313307396
2313307396
2313307396
2313307396
2363422259
2363422259
2387129290
2387129290
2387142483

output:

? 1000000000000
? 1498843346302
? 1748265019453
? 1831405577170
? 1859119096409
? 1886832615648
? 1890791689825
? 1894750764002
? 1894800878865
? 1898759953042
? 1898783660073
? 1902742734250
? 1902742747443
! 3959074177

result:

ok Queries used: 14

Test #59:

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

input:

3581072418
3581072418
3581072418
3581072418
4655571621
4655571621
4152202625
4152202625
4152202625
4152202625
4152203106

output:

? 1000000000000
? 1996418927582
? 2494628391373
? 2992837855164
? 3031161660071
? 3529371123862
? 3542836244505
? 4041045708296
? 4045701871509
? 4050358034722
? 4050358035203
! 4656163213

result:

ok Queries used: 12

Test #60:

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

input:

8141348001
8141348001
4393342102
4393342102
4393342102
4393342102
4446459365
4446459365
4446470148

output:

? 1000000000000
? 1991858651999
? 2016050326438
? 3007908978437
? 3021878818606
? 3035848658775
? 3035901776038
? 3049871616207
? 3049871626990
! 13969840169

result:

ok Queries used: 10

Test #61:

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

input:

13647009567
13647009567
13647009567
13647009567
13647009568

output:

? 1000000000000
? 1986352990433
? 2007339224272
? 2028325458111
? 2028325458112
! 20986233839

result:

ok Queries used: 6

Test #62:

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

input:

15027314580
15027314580
15027314580
15027314580
15027314580
15027314580
15027314581

output:

? 1000000000000
? 1492486342710
? 1738729514065
? 1984972685420
? 2034221319691
? 2083469953962
? 2083469953963
! 49248634271

result:

ok Queries used: 8

Test #63:

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

input:

9005331352
9005331352
9005331352
9005331352
9005331352
50296775879
50296775879
52634027456
52634027456
54202056995
54202056995
54202069556

output:

? 1000000000000
? 1495497334324
? 1743246001486
? 1867120335067
? 1990994668648
? 2032286113175
? 2156160446756
? 2158497698333
? 2282372031914
? 2283940061453
? 2407814395034
? 2407814407595
! 123874333581

result:

ok Queries used: 13

Test #64:

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

input:

244514369029
244514369029
244514369029
244514369029
244514369030

output:

? 1000000000000
? 1755485630971
? 2007314174628
? 2259142718285
? 2259142718286
! 251828543657

result:

ok Queries used: 6

Test #65:

score: 0
Accepted
time: 3ms
memory: 3612kb

input:

186610015322
186610015322
186610015322
186610015322
186610015323

output:

? 1000000000000
? 1813389984678
? 2220084977017
? 2626779969356
? 2626779969357
! 406694992339

result:

ok Queries used: 6

Test #66:

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

input:

114836217177
114836217177
161423784694
161423784694
161423784713

output:

? 1000000000000
? 1885163782823
? 1931751350340
? 2816915133163
? 2816915133182
! 885163782823

result:

ok Queries used: 6

Test #67:

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

input:

0
0
8
8
8
8
8
8
8

output:

? 1000000000000
? 1015625000000
? 1017578125000
? 1025390625000
? 1029296875000
? 1029297125000
? 1029297127000
? 1029297127080
? 1029297127096
! 16

result:

ok Queries used: 10

Test #68:

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

input:

20
20
49
49
49
49
55
55
55

output:

? 1000000000000
? 1499999999990
? 1749999999985
? 2249999999975
? 2349999999973
? 2449999999971
? 2453448275833
? 2553448275831
? 2553448275889
! 58

result:

ok Queries used: 10

Test #69:

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

input:

28
82
82
10
10
10
10
10
10
10

output:

? 1000000000000
? 1499999999986
? 2499999999958
? 2611111111066
? 3611111111038
? 3944444444362
? 4277777777686
? 4279452819562
? 4281127861438
? 4281127861546
! 108

result:

ok Queries used: 11

Test #70:

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

input:

100
18
18
18
18
18
18
18
18
18
66
66
66
66
66

output:

? 1000000000000
? 1499999999950
? 2499999999850
? 2833333333150
? 2944444444250
? 2966666666470
? 2971111110914
? 2975555555358
? 2975959595762
? 2976363636166
? 2976373490810
? 2976777531214
? 2976779022138
? 2976780513062
? 2976780513226
! 164

result:

ok Queries used: 16

Test #71:

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

input:

8
8
166
166
166
166
190
190
190
190
190
190
190

output:

? 1000000000000
? 1499999999996
? 1749999999994
? 2249999999990
? 2321428571418
? 2392857142846
? 2393761301978
? 2465189873406
? 2465883354682
? 2466576835958
? 2466578415642
? 2466579995326
? 2466579995642
! 316

result:

ok Queries used: 14

Test #72:

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

input:

250
250
625
625
125
575
575
575
575
575
575

output:

? 1000000000000
? 1999999999750
? 2499999999625
? 3499999999375
? 3833333332625
? 4033333332575
? 5033333332325
? 6033333332075
? 6039702758825
? 6046072185575
? 6046072186325
! 750

result:

ok Queries used: 12

Test #73:

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

input:

64
64
862
330
330
330
330
634
634
634
634
970
970
970
970
970

output:

? 1000000000000
? 1124999999992
? 1156249999990
? 1218749999986
? 1260416666650
? 1274305555538
? 1276289682522
? 1276573129234
? 1278557256218
? 1278673969570
? 1278790682922
? 1278796825730
? 1278913539082
? 1278916253346
? 1278918967610
? 1278918968674
! 1064

result:

ok Queries used: 17

Test #74:

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

input:

440
1500
1500
1500
652
652
1492
1492
1492
1492
1492

output:

? 1000000000000
? 1499999999780
? 2499999999340
? 3499999998900
? 3699999998812
? 4699999998372
? 4718867922892
? 5718867922452
? 5719089799532
? 5719311676612
? 5719311678732
! 2120

result:

ok Queries used: 12

Test #75:

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

input:

3940
710
710
710
710
710
3294
3294
3294
3294
4434
4434
2054
2054
2054
2054
2054

output:

? 1000000000000
? 1499999998030
? 2499999994090
? 3499999990150
? 3833333322170
? 4166666654190
? 4233333320594
? 4258974346134
? 4260946732714
? 4262919119294
? 4263035142034
? 4265007528614
? 4265111338434
? 4267083725014
? 4267103253594
? 4267122782174
? 4267122788634
! 6460

result:

ok Queries used: 18

Test #76:

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

input:

960
9000
9000
3640
3640
5784
5784
5784
5784
10584
10584
10584
10584
10584

output:

? 1000000000000
? 1124999999880
? 1624999999400
? 1874999999160
? 2374999998680
? 2474999998584
? 2974999998104
? 3046428569464
? 3117857140824
? 3118923238904
? 3190351810264
? 3190595593784
? 3190839377304
? 3190839388024
! 10720

result:

ok Queries used: 15

Test #77:

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

input:

12316
12316
3297
3297
3297
3297
6407
6407
3101
3101
3101

output:

? 1000000000000
? 1499999993842
? 1749999990763
? 2249999984605
? 2416666649219
? 2583333313833
? 2589080440199
? 2755747104813
? 2756283010487
? 2922949675101
? 2922949693139
! 18038

result:

ok Queries used: 12

Test #78:

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

input:

7168
7168
7168
7168
30707
30707
30707
30707
30707
30707
30709

output:

? 1000000000000
? 1031249999776
? 1035156249748
? 1037109374734
? 1038085937227
? 1040039062213
? 1040690103875
? 1041341145537
? 1041341192615
? 1041341239693
? 1041341239695
! 47078

result:

ok Queries used: 12

Test #79:

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

input:

56200
114148
114148
114148
75516
75516
75516
75516
86052
86052
86052
86052
86052
86052
86052
86052
86316

output:

? 1000000000000
? 1499999971900
? 2499999915700
? 3499999859500
? 3833333174100
? 4033333162860
? 4073333160612
? 4113333158364
? 4116969521796
? 4156969519548
? 4160046442452
? 4163123365356
? 4163145501492
? 4163167637628
? 4163167753524
? 4163167869420
? 4163167869684
! 115896

result:

ok Queries used: 18

Test #80:

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

input:

171376
19060
19060
120604
120604
188300
188300
188300
188300
188300
188300
188300
188300
188348

output:

? 1000000000000
? 1249999957156
? 2249999785780
? 2749999700092
? 3749999528716
? 4083332804924
? 5083332633548
? 5106588443516
? 5129844253484
? 5129920005308
? 5129995757132
? 5129995960220
? 5129996163308
? 5129996163356
! 203088

result:

ok Queries used: 15

Test #81:

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

input:

90642
90642
264685
264685
177987
177987
271061
271061
271061

output:

? 1000000000000
? 1999999909358
? 2499999864037
? 3499999773395
? 3503717245177
? 4503717154535
? 4505262749449
? 5505262658807
? 5505263006893
! 348086

result:

ok Queries used: 10

Test #82:

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

input:

890578
890578
384337
46843
46843
46843
46843
46843
46843
46843
46861

output:

? 1000000000000
? 1999999109422
? 2499998664133
? 2833331700607
? 3833330810029
? 4833329919451
? 4835900611249
? 4838471303047
? 4838472315529
? 4838473328011
? 4838473328029
! 1012482

result:

ok Queries used: 12

Test #83:

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

input:

1272228
230990
230990
230990
798938
798938
1894978
1894978
1806362
1806362
391850
391850
391850
391850
391850

output:

? 1000000000000
? 1499999363886
? 2499998091658
? 3499996819430
? 3590905794682
? 4590904522454
? 4643536034442
? 5643534762214
? 5664811330890
? 6664810058662
? 6683677959186
? 7683676686958
? 7685986152842
? 7688295618726
? 7688297701202
! 2082476

result:

ok Queries used: 16

Test #84:

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

input:

1040352
1040352
1040352
3114419
3114419
3114419
3114419
3114419
3114419
989765
989765
989765
989765
989847

output:

? 1000000000000
? 1249999739912
? 1312499674890
? 1343749642379
? 1406249577357
? 1411057264663
? 1415864951969
? 1416117988143
? 1416371024317
? 1416377195931
? 1416630232105
? 1416634380239
? 1416638528373
? 1416638528455
! 4148134

result:

ok Queries used: 15

Test #85:

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

input:

5437720
5437720
2064602
2064602
2064602
2064602
2064602
2064602
2064602
137106
137106
137106
137106
151190
151190
164602

output:

? 1000000000000
? 1499997281140
? 1749995921710
? 1805551175170
? 1811723981110
? 1813781583090
? 1815839185070
? 1816250705466
? 1816662225862
? 1816721014490
? 1817132534886
? 1817139281122
? 1817146027358
? 1817146041442
? 1817152787678
? 1817152801090
! 6746236

result:

ok Queries used: 17

Test #86:

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

input:

11536024
11536024
11536024
5301371
5301371
5301371
5301371
5301371
5301371
5301371
5301371
5301373

output:

? 1000000000000
? 1499994231988
? 1749991347982
? 1874989905979
? 2124987021973
? 2208319393971
? 2291651765969
? 2293684262847
? 2295716759725
? 2295729229031
? 2295741698337
? 2295741698339
! 12469306

result:

ok Queries used: 13

Test #87:

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

input:

13780282
13780282
583325
583325
583325
583325
1227079
1227079
1227079
1227079
16724423
16724423
16724423
16724423
16733361

output:

? 1000000000000
? 1999986219718
? 2499979329577
? 3499965549295
? 3833294289201
? 4166623029107
? 4174752998373
? 4508081738279
? 4512647885401
? 4517214032523
? 4517255923781
? 4521822070903
? 4521848464817
? 4521874858731
? 4521874867669
! 26393914

result:

ok Queries used: 16

Test #88:

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

input:

9978992
9978992
36222694
36222694
36222694
36222694
36222694
36222694
36222698

output:

? 1000000000000
? 1249997505252
? 1374996257878
? 1624993763130
? 1647720809062
? 1670447854994
? 1670500342398
? 1670552829802
? 1670552829806
! 52487404

result:

ok Queries used: 10

Test #89:

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

input:

85767850
85767850
20796165
20796165
20796165
20796165
20796165
124750861
124750861
124750861
124750861
126953291
126953291
126953881

output:

? 1000000000000
? 1999914232150
? 2499871348225
? 2610972929575
? 2648006790025
? 2660351410175
? 2662820334205
? 2663314119011
? 2665783043041
? 2665912986411
? 2666042929781
? 2666045132211
? 2666175075581
? 2666175076171
! 129943370

result:

ok Queries used: 15

Test #90:

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

input:

41269924
132790950
132790950
132790950
132790950
132790950
74866250
74866250
34510522
34510522
34510522
34510522
34550654

output:

? 1000000000000
? 1499979365038
? 2499938095114
? 2833257671806
? 2944364197370
? 3055470722934
? 3056877134650
? 3167983660214
? 3168858514746
? 3279965040310
? 3280148082362
? 3280331124414
? 3280331164546
! 183042052

result:

ok Queries used: 14

Test #91:

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

input:

69101460
69101460
262138313
262138313
262138313
262138313
262138313
262138313
330268967
330268967
330268967
330268967
330269001

output:

? 1000000000000
? 1499965449270
? 1749948173905
? 2249913623175
? 2349906713029
? 2449899802883
? 2464184530005
? 2478469257127
? 2479309535193
? 2493594262315
? 2493980336021
? 2494366409727
? 2494366409761
! 386073706

result:

ok Queries used: 14

Test #92:

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

input:

259611232
259611232
259611232
789134743
789134743
436119069
436119069
821227077
821227077
821227077
821227077
821227143

output:

? 1000000000000
? 1249935097192
? 1312418871490
? 1343660758639
? 1406144532937
? 1426972457703
? 1489456232001
? 1495136575119
? 1557620349417
? 1558679396439
? 1559738443461
? 1559738443527
! 1059047022

result:

ok Queries used: 13

Test #93:

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

input:

1089362944
1089362944
1089362944
439030498
439030498
872585462
872585462
914542394
914542394
917191406
917191406
917374058

output:

? 1000000000000
? 1031215957408
? 1035117952084
? 1037068949422
? 1038369614314
? 1038803169278
? 1040103834170
? 1040145791102
? 1041446455994
? 1041449105006
? 1042749769898
? 1042749952550
! 1300664892

result:

ok Queries used: 13

Test #94:

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

input:

851498650
851498650
2351721625
2351721625
2351721625
351424325
1551602705
1551602705
1551602705
1551602705
1551602705
1558729655
1558729655
1558792805

output:

? 1000000000000
? 1999148501350
? 2498722752025
? 2831772252475
? 2942788752625
? 2979794252675
? 3001997552705
? 3113014052855
? 3224030553005
? 3227030998955
? 3230031444905
? 3230038571855
? 3233039017805
? 3233039080955
! 3000445950

result:

ok Queries used: 15

Test #95:

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

input:

3648609932
64612126
64612126
64612126
64612126
64612126
64612130

output:

? 1000000000000
? 1498175695034
? 2494527085102
? 3490878475170
? 3498046470782
? 3505214466394
? 3505214466398
! 7167995612

result:

ok Queries used: 8

Test #96:

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

input:

11694689920
463947760
463947760
7951109200
7951109200
2959668240
2959668240
5954532816
5954532816
7315834896
7315834896
7315845456

output:

? 1000000000000
? 1123538163760
? 1617690818800
? 1864767146320
? 2029484698000
? 2084390548560
? 2249108100240
? 2282051610576
? 2297025933456
? 2298387235536
? 2313361558416
? 2313361568976
! 14974322880

result:

ok Queries used: 13

Test #97:

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

input:

264722440
264722440
16926977066
16926977066
16926977066
16926977066
16926977066
16926977066
17065253038
17065253038
17071770642
17071770642
17076699574

output:

? 1000000000000
? 1499867638780
? 1749801458170
? 2249669096950
? 2416291643210
? 2582914189470
? 2616238698722
? 2649563207974
? 2649701483946
? 2683025993198
? 2683032510802
? 2716357020054
? 2716361948986
! 33324509252

result:

ok Queries used: 14

Test #98:

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

input:

2576740624
2576740624
2576740624
23356391861
23356391861
23356391861
23356391861
23363063767
23363063767
23363076225

output:

? 1000000000000
? 1249355814844
? 1374033722266
? 1436372675977
? 1561050583399
? 1602609885873
? 1644169188347
? 1644175860253
? 1685735162727
? 1685735175185
! 41559302474

result:

ok Queries used: 11

Test #99:

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

input:

77083274668
11160651430
11160651430
11160651430
55109066922
55109066922
55109066922
55109066922
55110786366
55110786366
55111706514

output:

? 1000000000000
? 1461458362666
? 2384375087998
? 3307291813330
? 3614930721774
? 4537847447106
? 4669692693582
? 4801537940058
? 4801539659502
? 4933384905978
? 4933385826126
! 131845246476

result:

ok Queries used: 12

Test #100:

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

input:

141290783284
141290783284
69731681891
69731681891
69731681891
69731681891
80740774413
80740774413
80757283607
80757283607
80757509001

output:

? 1000000000000
? 1429354608358
? 1644031912537
? 2073386520895
? 2216504723681
? 2359622926467
? 2370632018989
? 2513750221775
? 2513766730969
? 2656884933755
? 2656885159149
! 143118202786

result:

ok Queries used: 12

Test #101:

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

input:

486071415678
486071415678
229107123517
229107123517
235612548635
235612548635
237012899001
237012899001
237012956987

output:

? 1000000000000
? 1513928584322
? 1770892876483
? 2284821460805
? 2291326885923
? 2805255470245
? 2806655820611
? 3320584404933
? 3320584462919
! 513928584322

result:

ok Queries used: 10

Test #102:

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

input:

35589991542
35589991542
517794995771
517794995771
591980381037
591980381037
591980381063

output:

? 1000000000000
? 1964410008458
? 2446615012687
? 3411025021145
? 3485210406411
? 4449620414869
? 4449620414895
! 964410008458

result:

ok Queries used: 8