QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#544126 | #4274. $2x + 2$ | kuaiqujuan | Compile Error | / | / | C++14 | 122b | 2024-09-02 09:58:06 | 2024-09-02 09:58:06 |
Judging History
answer
n = int(input())
n += 2
ans = -1
coef = 1
while n > 0 :
ans += n * coef
n //= 2
coef *= -1;
print(ans)
详细
answer.code:1:1: error: ‘n’ does not name a type 1 | n = int(input()) | ^ answer.code:9:6: error: expected constructor, destructor, or type conversion before ‘(’ token 9 | print(ans) | ^