QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#164106 | #4274. $2x + 2$ | wsyear | WA | 13ms | 8288kb | Python3 | 108b | 2023-09-04 19:54:48 | 2023-09-04 19:54:49 |
Judging History
answer
n = int(input())
ans = n % 2
coe = 1
while n != 0:
ans += coe * n
coe = -coe
n //= 2
print(ans)
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 11ms
memory: 8088kb
input:
4
output:
3
result:
ok answer is '3'
Test #2:
score: 0
Accepted
time: 13ms
memory: 8164kb
input:
10000000000
output:
6666666667
result:
ok answer is '6666666667'
Test #3:
score: -100
Wrong Answer
time: 5ms
memory: 8288kb
input:
11537
output:
7693
result:
wrong answer expected '7692', found '7693'