Task: | Crne |
Sender: | untokarila |
Submission time: | 2019-07-29 16:23:23 +0300 |
Language: | C++ (C++11) |
Status: | READY |
Result: | 100 |
group | verdict | score |
---|---|---|
#1 | ACCEPTED | 100 |
test | verdict | time | |
---|---|---|---|
#1 | ACCEPTED | 0.01 s | details |
#2 | ACCEPTED | 0.01 s | details |
#3 | ACCEPTED | 0.01 s | details |
#4 | ACCEPTED | 0.01 s | details |
#5 | ACCEPTED | 0.01 s | details |
Code
#include <iostream> using namespace std; int main(){ int n, a, b; cin >> n; a = n/2; b = a; if(n&1) b++; cout << a*b+a+b+1; return 0; }
Test details
Test 1
Verdict: ACCEPTED
input |
---|
2 |
correct output |
---|
4 |
user output |
---|
4 |
Test 2
Verdict: ACCEPTED
input |
---|
5 |
correct output |
---|
12 |
user output |
---|
12 |
Test 3
Verdict: ACCEPTED
input |
---|
10 |
correct output |
---|
36 |
user output |
---|
36 |
Test 4
Verdict: ACCEPTED
input |
---|
59 |
correct output |
---|
930 |
user output |
---|
930 |
Test 5
Verdict: ACCEPTED
input |
---|
100 |
correct output |
---|
2601 |
user output |
---|
2601 |