# | User | Rating |
---|---|---|
1 | tourist | 3985 |
2 | jiangly | 3814 |
3 | jqdai0815 | 3682 |
4 | Benq | 3529 |
5 | orzdevinwang | 3526 |
6 | ksun48 | 3517 |
7 | Radewoosh | 3410 |
8 | hos.lyric | 3399 |
9 | ecnerwala | 3392 |
9 | Um_nik | 3392 |
# | User | Contrib. |
---|---|---|
1 | cry | 169 |
2 | maomao90 | 162 |
2 | Um_nik | 162 |
4 | atcoder_official | 161 |
5 | djm03178 | 158 |
6 | -is-this-fft- | 157 |
7 | adamant | 155 |
8 | awoo | 154 |
8 | Dominater069 | 154 |
10 | luogu_official | 150 |
Name |
---|
input:
3289012
output:
3289015
output:
Can anyone explain it please ?
Try using
long double
. I used it and got AC.If both answers are the nearest, you should output the one with a smaller denominator. So if 9/6 and 3/2 are both ok, you shoud output 3/2. Reducing the fraction will ensure this.
The only difference between 3289012 and 3289015 is
cout << "*\n";
is commented. In submission 3289012, output is correct(1/1
) but it includes*
, in submission 3289015 output is incorrect(4/3
).