QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#324339 | #4274. $2x + 2$ | Tobo | Compile Error | / | / | C++20 | 161b | 2024-02-10 17:55:03 | 2024-02-10 17:55:10 |
Judging History
answer
n = int(input())
n += 2
ans = -1
i = 1
while n > 0:
if i % 2 == 1:
ans += n
else:
ans -= n
i += 1
n //= 2
print(ans)
Details
answer.code:1:1: error: ‘n’ does not name a type 1 | n = int(input()) | ^