QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#809435#7962. 前缀和GeekmenWA 0ms3920kbC++14172b2024-12-11 15:02:172024-12-11 15:02:22

Judging History

This is the latest submission verdict.

  • [2024-12-11 15:02:22]
  • Judged
  • Verdict: WA
  • Time: 0ms
  • Memory: 3920kb
  • [2024-12-11 15:02:17]
  • Submitted

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'