QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#809435 | #7962. 前缀和 | Geekmen | WA | 0ms | 3920kb | C++14 | 172b | 2024-12-11 15:02:17 | 2024-12-11 15:02:22 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, l, r;
double p;
cin >> n >> p >> l >> r;
cout << floor(p * r) - ceil(p * l) + 1 << endl;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3816kb
input:
3 0.5 1 2
output:
1
result:
ok found '1.0000000', expected '1.0000000', error '0.0000000'
Test #2:
score: -100
Wrong Answer
time: 0ms
memory: 3920kb
input:
1 0.529148 1 1
output:
0
result:
wrong answer 1st numbers differ - expected: '0.5291480', found: '0.0000000', error = '0.5291480'