| Task: | Dice Combinations |
| Sender: | aalto26ch_013 |
| Submission time: | 2026-09-10 17:05:33 +0300 |
| Language: | Python3 (PyPy3) |
| Status: | READY |
| Result: | RUNTIME ERROR |
| test | verdict | time | |
|---|---|---|---|
| #1 | RUNTIME ERROR | 0.06 s | details |
| #2 | RUNTIME ERROR | 0.06 s | details |
| #3 | RUNTIME ERROR | 0.06 s | details |
| #4 | RUNTIME ERROR | 0.06 s | details |
| #5 | RUNTIME ERROR | 0.06 s | details |
| #6 | RUNTIME ERROR | 0.06 s | details |
| #7 | RUNTIME ERROR | 0.06 s | details |
| #8 | RUNTIME ERROR | 0.06 s | details |
| #9 | RUNTIME ERROR | 0.06 s | details |
| #10 | RUNTIME ERROR | 0.06 s | details |
| #11 | RUNTIME ERROR | 0.06 s | details |
| #12 | RUNTIME ERROR | 0.06 s | details |
| #13 | RUNTIME ERROR | 0.06 s | details |
| #14 | RUNTIME ERROR | 0.06 s | details |
| #15 | RUNTIME ERROR | 0.06 s | details |
| #16 | RUNTIME ERROR | 0.06 s | details |
| #17 | RUNTIME ERROR | 0.06 s | details |
| #18 | RUNTIME ERROR | 0.06 s | details |
| #19 | RUNTIME ERROR | 0.06 s | details |
| #20 | RUNTIME ERROR | 0.06 s | details |
Code
using namespace std;
typedef long long ll;
#define MAXN 1000001
#define MOD 1000000007
int rec_f[MAXN], n;
int combinations (int remaining) {
if (rec_f[remaining] != 0) {
return rec_f[remaining];
}
for (int i = 1; i <= 6; i++) {
if (remaining - i >= 0) {
rec_f[remaining] += combinations(remaining - i);
rec_f[remaining] %= MOD;
}
}
return rec_f[remaining];
}
int main() {
cin >> n;
memset(rec_f, 0, sizeof(rec_f));
rec_f[0] = 1;
cout << combinations(n) << endl;
}Test details
Test 1
Verdict: RUNTIME ERROR
| input |
|---|
| 1 |
| correct output |
|---|
| 1 |
| user output |
|---|
| (empty) |
Error:
File "/box/input/code.py", line 1
using namespace std;
^
SyntaxError: invalid sy...Test 2
Verdict: RUNTIME ERROR
| input |
|---|
| 2 |
| correct output |
|---|
| 2 |
| user output |
|---|
| (empty) |
Error:
File "/box/input/code.py", line 1
using namespace std;
^
SyntaxError: invalid sy...Test 3
Verdict: RUNTIME ERROR
| input |
|---|
| 3 |
| correct output |
|---|
| 4 |
| user output |
|---|
| (empty) |
Error:
File "/box/input/code.py", line 1
using namespace std;
^
SyntaxError: invalid sy...Test 4
Verdict: RUNTIME ERROR
| input |
|---|
| 4 |
| correct output |
|---|
| 8 |
| user output |
|---|
| (empty) |
Error:
File "/box/input/code.py", line 1
using namespace std;
^
SyntaxError: invalid sy...Test 5
Verdict: RUNTIME ERROR
| input |
|---|
| 5 |
| correct output |
|---|
| 16 |
| user output |
|---|
| (empty) |
Error:
File "/box/input/code.py", line 1
using namespace std;
^
SyntaxError: invalid sy...Test 6
Verdict: RUNTIME ERROR
| input |
|---|
| 6 |
| correct output |
|---|
| 32 |
| user output |
|---|
| (empty) |
Error:
File "/box/input/code.py", line 1
using namespace std;
^
SyntaxError: invalid sy...Test 7
Verdict: RUNTIME ERROR
| input |
|---|
| 7 |
| correct output |
|---|
| 63 |
| user output |
|---|
| (empty) |
Error:
File "/box/input/code.py", line 1
using namespace std;
^
SyntaxError: invalid sy...Test 8
Verdict: RUNTIME ERROR
| input |
|---|
| 8 |
| correct output |
|---|
| 125 |
| user output |
|---|
| (empty) |
Error:
File "/box/input/code.py", line 1
using namespace std;
^
SyntaxError: invalid sy...Test 9
Verdict: RUNTIME ERROR
| input |
|---|
| 9 |
| correct output |
|---|
| 248 |
| user output |
|---|
| (empty) |
Error:
File "/box/input/code.py", line 1
using namespace std;
^
SyntaxError: invalid sy...Test 10
Verdict: RUNTIME ERROR
| input |
|---|
| 10 |
| correct output |
|---|
| 492 |
| user output |
|---|
| (empty) |
Error:
File "/box/input/code.py", line 1
using namespace std;
^
SyntaxError: invalid sy...Test 11
Verdict: RUNTIME ERROR
| input |
|---|
| 50 |
| correct output |
|---|
| 660641036 |
| user output |
|---|
| (empty) |
Error:
File "/box/input/code.py", line 1
using namespace std;
^
SyntaxError: invalid sy...Test 12
Verdict: RUNTIME ERROR
| input |
|---|
| 1000 |
| correct output |
|---|
| 937196411 |
| user output |
|---|
| (empty) |
Error:
File "/box/input/code.py", line 1
using namespace std;
^
SyntaxError: invalid sy...Test 13
Verdict: RUNTIME ERROR
| input |
|---|
| 123456 |
| correct output |
|---|
| 113810539 |
| user output |
|---|
| (empty) |
Error:
File "/box/input/code.py", line 1
using namespace std;
^
SyntaxError: invalid sy...Test 14
Verdict: RUNTIME ERROR
| input |
|---|
| 654321 |
| correct output |
|---|
| 615247550 |
| user output |
|---|
| (empty) |
Error:
File "/box/input/code.py", line 1
using namespace std;
^
SyntaxError: invalid sy...Test 15
Verdict: RUNTIME ERROR
| input |
|---|
| 999998 |
| correct output |
|---|
| 39372206 |
| user output |
|---|
| (empty) |
Error:
File "/box/input/code.py", line 1
using namespace std;
^
SyntaxError: invalid sy...Test 16
Verdict: RUNTIME ERROR
| input |
|---|
| 999999 |
| correct output |
|---|
| 511319454 |
| user output |
|---|
| (empty) |
Error:
File "/box/input/code.py", line 1
using namespace std;
^
SyntaxError: invalid sy...Test 17
Verdict: RUNTIME ERROR
| input |
|---|
| 1000000 |
| correct output |
|---|
| 874273980 |
| user output |
|---|
| (empty) |
Error:
File "/box/input/code.py", line 1
using namespace std;
^
SyntaxError: invalid sy...Test 18
Verdict: RUNTIME ERROR
| input |
|---|
| 1001 |
| correct output |
|---|
| 94201505 |
| user output |
|---|
| (empty) |
Error:
File "/box/input/code.py", line 1
using namespace std;
^
SyntaxError: invalid sy...Test 19
Verdict: RUNTIME ERROR
| input |
|---|
| 999997 |
| correct output |
|---|
| 74225807 |
| user output |
|---|
| (empty) |
Error:
File "/box/input/code.py", line 1
using namespace std;
^
SyntaxError: invalid sy...Test 20
Verdict: RUNTIME ERROR
| input |
|---|
| 40 |
| correct output |
|---|
| 567401756 |
| user output |
|---|
| (empty) |
Error:
File "/box/input/code.py", line 1
using namespace std;
^
SyntaxError: invalid sy...