QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#803527#8977. PyramidOniriqueAC ✓613ms3644kbC++14428b2024-12-07 17:26:522024-12-07 17:27:11

Judging History

This is the latest submission verdict.

  • [2024-12-07 17:27:11]
  • Judged
  • Verdict: AC
  • Time: 613ms
  • Memory: 3644kb
  • [2024-12-07 17:26:52]
  • Submitted

answer

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define int long long
const int MOD=1e9+7;
int T,x;
ll quick_pow(ll x,ll n){
	ll res = 1;
	while(n > 0){
		if(n & 1)	res = res * x % MOD;
		x = x * x % MOD;
		n >>= 1;
	}
	return res;
}
signed main(){
    cin>>T;
    while(T--){
        cin>>x;
        cout<<(( (((x*(x+1)%MOD)*(x+2)%MOD)*(x+3)%MOD) )*quick_pow(24,MOD-2)%MOD)<<endl;
    }
}

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

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

3
1
2
3

output:

1
5
15

result:

ok 3 lines

Test #2:

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

input:

10
20
1
15
17
11
2
15
3
16
3

output:

8855
1
3060
4845
1001
5
3060
15
3876
15

result:

ok 10 lines

Test #3:

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

input:

1000000
709877
145493
170549
915888
2504
680394
758139
24665
365499
242644
535590
994789
297247
518365
834337
852392
945750
480961
126953
485671
11673
262033
473744
199902
743475
91856
394619
779195
616388
60537
756645
570144
510464
285494
932570
298148
627373
110058
469501
686867
559208
82153
90754...

output:

813766151
35411818
572240805
889544230
973752923
416745856
266500569
351391603
187168654
586622497
582939391
686760578
346267633
217239018
150765102
623810029
571166421
504908842
909507449
129893417
683499268
130804119
194753925
619913926
267518201
695115780
242357608
507022444
77900671
783852707
33...

result:

ok 1000000 lines

Test #4:

score: 0
Accepted
time: 613ms
memory: 3596kb

input:

1000000
556741142
138842067
7483867
621306163
351281546
595944065
95480114
365508036
751387459
56035370
757174318
169438287
638944328
172990655
762444787
884150457
284572671
788442934
321169997
239880233
764811445
554749447
207350825
203005320
577205786
687656367
676361754
130565640
256253378
854937...

output:

806682024
999147447
473235108
193727620
2031458
778862831
926468905
48298109
357762025
477145099
170411311
183214029
615858619
864976317
914311750
825975014
40642632
293984611
139484840
515505188
924248559
903924522
898804556
444792193
461831041
1557063
579924595
797200618
85247255
465350520
6854180...

result:

ok 1000000 lines

Test #5:

score: 0
Accepted
time: 613ms
memory: 3592kb

input:

1000000
390602350
309259898
81796509
722458219
498353040
887965699
844069666
480379669
49852754
728850662
523669217
285268200
618476311
886088297
535131131
427170696
282949153
519064950
303314862
198768355
833825067
120385880
513470802
752928392
531438327
380398447
243921603
695254477
928297130
7056...

output:

538003520
37511013
283775061
178461701
725828236
89653374
215139321
697338295
527886572
427901836
974663564
155808594
337208635
852195844
484256752
298530089
31080422
792651120
281949989
528381733
342813838
556915021
215284489
158005665
574135538
94186144
779263347
73387552
639280975
181624287
13075...

result:

ok 1000000 lines

Extra Test:

score: 0
Extra Test Passed