#include <iostream>
using namespace std;
typedef long long lld;
lld A,B;
int main()
{
cin >> A >> B;
if (A&1) A++;
if (B&1) B--;
if (A < 3) A = 4;
if (A <= B) cout << (A+B)*((B-A)/2+1)/2 << endl;
else cout << "0\n";
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
1672 KB |
Output is correct |
2 |
Correct |
0 ms |
1672 KB |
Output is correct |
3 |
Correct |
0 ms |
1672 KB |
Output is correct |
4 |
Correct |
0 ms |
1672 KB |
Output is correct |
5 |
Correct |
0 ms |
1672 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
1672 KB |
Output is correct |
2 |
Correct |
0 ms |
1672 KB |
Output is correct |
3 |
Correct |
0 ms |
1672 KB |
Output is correct |
4 |
Correct |
0 ms |
1672 KB |
Output is correct |
5 |
Correct |
0 ms |
1672 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
1672 KB |
Output is correct |
2 |
Correct |
0 ms |
1672 KB |
Output is correct |
3 |
Correct |
0 ms |
1672 KB |
Output is correct |
4 |
Correct |
0 ms |
1672 KB |
Output is correct |
5 |
Correct |
0 ms |
1672 KB |
Output is correct |