# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
86395 |
2018-11-26T09:00:08 Z |
Pluton |
Savrsen (COCI17_savrsen) |
C++17 |
|
136 ms |
552 KB |
#include <bits/stdc++.h>
#define ld long double
#define ll long long
#define sz size()
#define all(xx) xx.begin(),xx.end()
#define pb push_back
#define in insert
#define er erase
#define S second
#define F first
#define pii pair <int, int>
#define to_be continue
#define mp make_pair
#define stop exit (0)
#define fname ""
#define speed ios_base::sync_with_stdio(0);cin.tie(0)
#define input freopen (fname".in", "r", stdin)
#define output freopen (fname".out", "w", stdout)
#define int ll
#define N 600000
using namespace std;
const int inf = 1e9 + 123;
const ll INF = 1e18 + 123;
const double pi = acos (-1.0);
const ld eps = 1e-3;
int a, b, ans;
main ()
{
speed;
cin >> a >> b;
for (int i = 1; i <= 1e7 +123; i ++)
{
// cout << ((b / i - 1) - max (((a - 1) / i - 1), 0)) << endl;
ans += i * ((b / i - 1) - max (((a - 1) / i - 1), 0ll));
if (((b / i - 1)) <= 0)
break;
}
cout << abs ((a + b) * (b - a + 1) / 2 - ans);
}
//Coded by A....
Compilation message
savrsen.cpp:32:7: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
main ()
^
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
376 KB |
Output isn't correct |
2 |
Incorrect |
2 ms |
380 KB |
Output isn't correct |
3 |
Incorrect |
3 ms |
420 KB |
Output isn't correct |
4 |
Incorrect |
134 ms |
440 KB |
Output isn't correct |
5 |
Incorrect |
133 ms |
488 KB |
Output isn't correct |
6 |
Incorrect |
136 ms |
488 KB |
Output isn't correct |
7 |
Incorrect |
117 ms |
552 KB |
Output isn't correct |
8 |
Incorrect |
39 ms |
552 KB |
Output isn't correct |