QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#84234 | #2920. Ultimate Binary Watch | bharath26 | WA | 7ms | 8100kb | Python3 | 634b | 2023-03-06 02:36:04 | 2023-03-06 02:36:07 |
Judging History
answer
n = input()
n = int(n)
arr= [False for _ in range(16)]
i = 15
while n>0:
last=int(n%10)
n=n/10
#find bit map
#store in array
#6 -> 0110 right shift
for _ in range(4):
check = last & 1
last = last >> 1
if check:
arr[i]=True
i-=1
for i in range(4):
res = [" " for _ in range(5)]
for j in range(4):
temp =j
if temp>=2:
temp+=1
if arr[i+4*j]:
res[temp]="*"
else:
res[temp]="."
print(''.join(res))
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 7ms
memory: 8100kb
input:
1234
output:
.. .. .. .* .* *. *. *.
result:
wrong answer 1st lines differ - expected: '. . . .', found: '.. ..'