# | User | Rating |
---|---|---|
1 | tourist | 3803 |
2 | Benq | 3783 |
3 | Radewoosh | 3602 |
4 | maroonrk | 3575 |
5 | fantasy | 3526 |
6 | ko_osaga | 3500 |
7 | ksun48 | 3491 |
8 | Um_nik | 3486 |
9 | jiangly | 3474 |
10 | orzdevinwang | 3461 |
# | User | Contrib. |
---|---|---|
1 | awoo | 180 |
2 | -is-this-fft- | 177 |
3 | nor | 169 |
4 | Um_nik | 168 |
5 | SecondThread | 164 |
6 | maroonrk | 163 |
7 | adamant | 161 |
8 | kostka | 160 |
9 | YouKn0wWho | 158 |
10 | errorgorn | 153 |
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 |
---|