QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#803456 | #8977. Pyramid | kindDew | WA | 355ms | 3708kb | C++20 | 367b | 2024-12-07 17:13:16 | 2024-12-07 17:13:16 |
Judging History
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.5;
r %= mod;
cout << r << endl;
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 3568kb
input:
3 1 2 3
output:
1 5 15
result:
ok 3 lines
Test #2:
score: 0
Accepted
time: 0ms
memory: 3632kb
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: 355ms
memory: 3708kb
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 79186 16500567 18058267 20501986 3289160 41272721 20093907 12934297 8905683 25765101 40476692 29499751 4908839 34507443 4893416 16832597 5804118 28087257 36580589 17518199 28449109 34024273 7022441 36234004 33852702 1579142 13423076 27245499 35772908 4202...
result:
wrong answer 1st lines differ - expected: '813766151', found: '22099479'