# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
535697 |
2022-03-10T23:53:53 Z |
pokmui9909 |
다각형 (GA5_polygon) |
C++17 |
|
1 ms |
328 KB |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main(){
cin.tie(0) -> sync_with_stdio(false);
ll L, R; cin >> L >> R;
cout << (R <= 2 ? 2 : (R / 2) * (R / 2 + 1)) - (L - 1 <= 2 ? 2 : ((L - 1) / 2) * ((L - 1) / 2 + 1));
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
0 ms |
212 KB |
Output is correct |
3 |
Correct |
1 ms |
212 KB |
Output is correct |
4 |
Correct |
1 ms |
212 KB |
Output is correct |
5 |
Correct |
1 ms |
212 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
1 ms |
328 KB |
Output is correct |
4 |
Correct |
1 ms |
212 KB |
Output is correct |
5 |
Correct |
0 ms |
212 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
0 ms |
212 KB |
Output is correct |
4 |
Correct |
0 ms |
212 KB |
Output is correct |
5 |
Correct |
0 ms |
212 KB |
Output is correct |