QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#803462#8977. PyramidkindDewWA 483ms3720kbC++20367b2024-12-07 17:14:422024-12-07 17:14:42

Judging History

This is the latest submission verdict.

  • [2024-12-07 17:14:42]
  • Judged
  • Verdict: WA
  • Time: 483ms
  • Memory: 3720kb
  • [2024-12-07 17:14:42]
  • Submitted

answer

#include <iostream>
#include <vector>
#include <set>
using namespace std;

int main() {
	long long n,t;
	cin >> t;
	const long long mod = 1000000007;
	while (t--) {
		long long x;
		cin >> x;
		
		long long r = ( (x * x % mod * x % mod * x) + (6 * x * x % mod * x) + (11*x*x) + 6*x)%mod / 24.0 + 0.7;
		r %= mod;
		cout << r << endl;
	}
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

3
1
2
3

output:

1
5
15

result:

ok 3 lines

Test #2:

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

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: -100
Wrong Answer
time: 483ms
memory: 3720kb

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:

22099479
35411818
30574135
14544224
15419583
79187
16500567
18058268
20501986
3289160
41272721
20093907
12934298
8905683
25765101
40476692
29499751
4908839
34507443
4893416
16832597
5804118
28087257
36580589
17518199
28449109
34024273
7022441
36234004
33852702
1579143
13423076
27245499
35772908
4202...

result:

wrong answer 1st lines differ - expected: '813766151', found: '22099479'