QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#164572 | #4274. $2x + 2$ | __mjj | WA | 18ms | 9112kb | Python3 | 127b | 2023-09-05 10:04:06 | 2023-09-05 10:04:07 |
Judging History
answer
n = int(input())
# n += 2
res = 0;
fl = 1;
while(n != 0):
res += fl * n;
n //= 2;
fl = -fl;
print(res);
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 6ms
memory: 9024kb
input:
4
output:
3
result:
ok answer is '3'
Test #2:
score: 0
Accepted
time: 18ms
memory: 9088kb
input:
10000000000
output:
6666666667
result:
ok answer is '6666666667'
Test #3:
score: 0
Accepted
time: 8ms
memory: 9112kb
input:
11537
output:
7692
result:
ok answer is '7692'
Test #4:
score: 0
Accepted
time: 9ms
memory: 9088kb
input:
41309
output:
27540
result:
ok answer is '27540'
Test #5:
score: 0
Accepted
time: 17ms
memory: 9104kb
input:
8191927142339937565554845978095081242540169480073285738552305926582959325059543812213073905385467089
output:
5461284761559958377036563985396720828360112986715523825701537284388639550039695874808715936923644727
result:
ok answer is '546128476155995837703656398539...9550039695874808715936923644727'
Test #6:
score: 0
Accepted
time: 9ms
memory: 9088kb
input:
3442352750904517878505619138601923704219437640757539618101640600496556715434957688100692603387053285
output:
2294901833936345252337079425734615802812958427171693078734427066997704476956638458733795068924702192
result:
ok answer is '229490183393634525233707942573...4476956638458733795068924702192'
Test #7:
score: 0
Accepted
time: 18ms
memory: 9040kb
input:
1613323280652897219227411721866100145041476611268669226074320085219149805106782606494134047806758188
output:
1075548853768598146151607814577400096694317740845779484049546723479433203404521737662756031871172125
result:
ok answer is '107554885376859814615160781457...3203404521737662756031871172125'
Test #8:
score: -100
Wrong Answer
time: 10ms
memory: 9076kb
input:
5315968240892751432719450950079352483724763602617515777985835699795112297723617975471814602589260139
output:
3543978827261834288479633966719568322483175735078343851990557133196741531815745316981209735059506755
result:
wrong answer expected '354397882726183428847963396671...1531815745316981209735059506756', found '354397882726183428847963396671...1531815745316981209735059506755'