# | User | Rating |
---|---|---|
1 | tourist | 3764 |
2 | slime | 3592 |
3 | maroonrk | 3535 |
4 | Benq | 3513 |
5 | jiangly | 3509 |
6 | ecnerwala | 3508 |
7 | MiracleFaFa | 3466 |
8 | ksun48 | 3452 |
9 | Um_nik | 3426 |
10 | greenheadstrange | 3393 |
# | User | Contrib. |
---|---|---|
1 | awoo | 192 |
2 | -is-this-fft- | 191 |
3 | Monogon | 183 |
4 | YouKn0wWho | 182 |
5 | Um_nik | 181 |
6 | antontrygubO_o | 173 |
7 | maroonrk | 168 |
8 | errorgorn | 165 |
8 | SecondThread | 165 |
10 | kostka | 164 |
What's the reason behind the Runtime Error?
I got a runtime error on the last Atcoder Regular Contest.
The problem is this .
My RE solution here .
I used (char) (k+'0') to convert the digit k to character.
for (int k = 1; k < 7; k++) {
if (!f[k]) {
ch[i][j] = (char)(k + '0');
break;
}
}
3 3
...
...
...
I always wrote (char) ('a'+k)
to get the kth letter from the alphabet and didn't get Runtime Error on any platform.
Why am I getting RE this time?
Name |
---|