QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#84234#2920. Ultimate Binary Watchbharath26WA 7ms8100kbPython3634b2023-03-06 02:36:042023-03-06 02:36:07

Judging History

你现在查看的是最新测评结果

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-03-06 02:36:07]
  • 评测
  • 测评结果:WA
  • 用时:7ms
  • 内存:8100kb
  • [2023-03-06 02:36:04]
  • 提交

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))
        
        
        
    
    
    

详细

Test #1:

score: 0
Wrong Answer
time: 7ms
memory: 8100kb

input:

1234

output:

.. ..
.. .*
.* *.
*. *.

result:

wrong answer 1st lines differ - expected: '. .   . .', found: '.. ..'