QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#84235#2920. Ultimate Binary Watchbharath26AC ✓21ms8136kbPython3600b2023-03-06 02:40:202023-03-06 02:40:22

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:40:22]
  • 评测
  • 测评结果:AC
  • 用时:21ms
  • 内存:8136kb
  • [2023-03-06 02:40:20]
  • 提交

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
        
slots = [0,2,6,8]
for i in range(4):
    res = [" " for _ in range(9)]
    for j in range(4):
        if arr[i+4*j]:
            res[slots[j]]="*"
        else:
            res[slots[j]]="."
    print(''.join(res))
        
        
        
    
    
    

详细

Test #1:

score: 100
Accepted
time: 13ms
memory: 8044kb

input:

1234

output:

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

result:

ok 4 lines

Test #2:

score: 0
Accepted
time: 6ms
memory: 8096kb

input:

0056

output:

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

result:

ok 4 lines

Test #3:

score: 0
Accepted
time: 10ms
memory: 7964kb

input:

0708

output:

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

result:

ok 4 lines

Test #4:

score: 0
Accepted
time: 21ms
memory: 8072kb

input:

0909

output:

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

result:

ok 4 lines

Test #5:

score: 0
Accepted
time: 11ms
memory: 8016kb

input:

0000

output:

. .   . .
. .   . .
. .   . .
. .   . .

result:

ok 4 lines

Test #6:

score: 0
Accepted
time: 12ms
memory: 7968kb

input:

0001

output:

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

result:

ok 4 lines

Test #7:

score: 0
Accepted
time: 13ms
memory: 8076kb

input:

0100

output:

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

result:

ok 4 lines

Test #8:

score: 0
Accepted
time: 15ms
memory: 8064kb

input:

2300

output:

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

result:

ok 4 lines

Test #9:

score: 0
Accepted
time: 4ms
memory: 8136kb

input:

2359

output:

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

result:

ok 4 lines

Test #10:

score: 0
Accepted
time: 11ms
memory: 8068kb

input:

1757

output:

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

result:

ok 4 lines

Test #11:

score: 0
Accepted
time: 11ms
memory: 8052kb

input:

0959

output:

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

result:

ok 4 lines

Test #12:

score: 0
Accepted
time: 18ms
memory: 8080kb

input:

2007

output:

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

result:

ok 4 lines

Test #13:

score: 0
Accepted
time: 5ms
memory: 8008kb

input:

2244

output:

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

result:

ok 4 lines

Test #14:

score: 0
Accepted
time: 17ms
memory: 8028kb

input:

1939

output:

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

result:

ok 4 lines

Test #15:

score: 0
Accepted
time: 17ms
memory: 8044kb

input:

0117

output:

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

result:

ok 4 lines

Test #16:

score: 0
Accepted
time: 3ms
memory: 8064kb

input:

0220

output:

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

result:

ok 4 lines

Test #17:

score: 0
Accepted
time: 21ms
memory: 8064kb

input:

1354

output:

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

result:

ok 4 lines

Test #18:

score: 0
Accepted
time: 8ms
memory: 8064kb

input:

1201

output:

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

result:

ok 4 lines

Test #19:

score: 0
Accepted
time: 18ms
memory: 8012kb

input:

1902

output:

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

result:

ok 4 lines

Test #20:

score: 0
Accepted
time: 7ms
memory: 8040kb

input:

2229

output:

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

result:

ok 4 lines

Test #21:

score: 0
Accepted
time: 5ms
memory: 8100kb

input:

0749

output:

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

result:

ok 4 lines

Test #22:

score: 0
Accepted
time: 17ms
memory: 8072kb

input:

1957

output:

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

result:

ok 4 lines

Test #23:

score: 0
Accepted
time: 8ms
memory: 8040kb

input:

0019

output:

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

result:

ok 4 lines

Test #24:

score: 0
Accepted
time: 6ms
memory: 8044kb

input:

1127

output:

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

result:

ok 4 lines

Test #25:

score: 0
Accepted
time: 10ms
memory: 8036kb

input:

1502

output:

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

result:

ok 4 lines

Test #26:

score: 0
Accepted
time: 10ms
memory: 8048kb

input:

1615

output:

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

result:

ok 4 lines

Test #27:

score: 0
Accepted
time: 11ms
memory: 8044kb

input:

1900

output:

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

result:

ok 4 lines

Test #28:

score: 0
Accepted
time: 12ms
memory: 8040kb

input:

0830

output:

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

result:

ok 4 lines