QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#75384 | #2227. Organ-free Man | juwkim | AC ✓ | 21ms | 8632kb | Python3 | 292b | 2023-02-05 05:58:50 | 2023-02-05 05:58:52 |
Judging History
answer
facs = [1]
for i in range(1, 10):
facs.append(facs[-1] * i)
ans = []
num = int(input())
idx = 9
while num:
if facs[idx] <= num:
ans.append(idx)
num -= facs[idx]
else:
idx -= 1
if ans == [1]:
print(0)
else:
print(*ans[::-1], sep="")
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 10ms
memory: 7968kb
input:
1
output:
0
result:
ok single line: '0'
Test #2:
score: 0
Accepted
time: 5ms
memory: 8144kb
input:
2
output:
2
result:
ok single line: '2'
Test #3:
score: 0
Accepted
time: 14ms
memory: 8032kb
input:
3
output:
12
result:
ok single line: '12'
Test #4:
score: 0
Accepted
time: 13ms
memory: 8196kb
input:
4
output:
22
result:
ok single line: '22'
Test #5:
score: 0
Accepted
time: 7ms
memory: 8064kb
input:
5
output:
122
result:
ok single line: '122'
Test #6:
score: 0
Accepted
time: 17ms
memory: 8196kb
input:
6
output:
3
result:
ok single line: '3'
Test #7:
score: 0
Accepted
time: 13ms
memory: 8208kb
input:
7
output:
13
result:
ok single line: '13'
Test #8:
score: 0
Accepted
time: 13ms
memory: 8124kb
input:
8
output:
23
result:
ok single line: '23'
Test #9:
score: 0
Accepted
time: 12ms
memory: 8148kb
input:
9
output:
123
result:
ok single line: '123'
Test #10:
score: 0
Accepted
time: 11ms
memory: 8068kb
input:
10
output:
223
result:
ok single line: '223'
Test #11:
score: 0
Accepted
time: 8ms
memory: 8080kb
input:
11
output:
1223
result:
ok single line: '1223'
Test #12:
score: 0
Accepted
time: 9ms
memory: 8212kb
input:
12
output:
33
result:
ok single line: '33'
Test #13:
score: 0
Accepted
time: 9ms
memory: 8084kb
input:
13
output:
133
result:
ok single line: '133'
Test #14:
score: 0
Accepted
time: 14ms
memory: 8084kb
input:
14
output:
233
result:
ok single line: '233'
Test #15:
score: 0
Accepted
time: 10ms
memory: 8120kb
input:
15
output:
1233
result:
ok single line: '1233'
Test #16:
score: 0
Accepted
time: 21ms
memory: 8076kb
input:
16
output:
2233
result:
ok single line: '2233'
Test #17:
score: 0
Accepted
time: 3ms
memory: 8032kb
input:
17
output:
12233
result:
ok single line: '12233'
Test #18:
score: 0
Accepted
time: 17ms
memory: 8200kb
input:
18
output:
333
result:
ok single line: '333'
Test #19:
score: 0
Accepted
time: 8ms
memory: 8204kb
input:
19
output:
1333
result:
ok single line: '1333'
Test #20:
score: 0
Accepted
time: 10ms
memory: 8084kb
input:
20
output:
2333
result:
ok single line: '2333'
Test #21:
score: 0
Accepted
time: 6ms
memory: 8216kb
input:
21
output:
12333
result:
ok single line: '12333'
Test #22:
score: 0
Accepted
time: 13ms
memory: 8132kb
input:
22
output:
22333
result:
ok single line: '22333'
Test #23:
score: 0
Accepted
time: 0ms
memory: 8084kb
input:
23
output:
122333
result:
ok single line: '122333'
Test #24:
score: 0
Accepted
time: 14ms
memory: 8192kb
input:
24
output:
4
result:
ok single line: '4'
Test #25:
score: 0
Accepted
time: 11ms
memory: 8208kb
input:
25
output:
14
result:
ok single line: '14'
Test #26:
score: 0
Accepted
time: 8ms
memory: 8084kb
input:
26
output:
24
result:
ok single line: '24'
Test #27:
score: 0
Accepted
time: 8ms
memory: 8140kb
input:
27
output:
124
result:
ok single line: '124'
Test #28:
score: 0
Accepted
time: 16ms
memory: 8076kb
input:
28
output:
224
result:
ok single line: '224'
Test #29:
score: 0
Accepted
time: 1ms
memory: 8140kb
input:
29
output:
1224
result:
ok single line: '1224'
Test #30:
score: 0
Accepted
time: 17ms
memory: 8148kb
input:
30
output:
34
result:
ok single line: '34'
Test #31:
score: 0
Accepted
time: 8ms
memory: 8204kb
input:
31
output:
134
result:
ok single line: '134'
Test #32:
score: 0
Accepted
time: 2ms
memory: 8204kb
input:
32
output:
234
result:
ok single line: '234'
Test #33:
score: 0
Accepted
time: 15ms
memory: 8128kb
input:
33
output:
1234
result:
ok single line: '1234'
Test #34:
score: 0
Accepted
time: 17ms
memory: 8208kb
input:
34
output:
2234
result:
ok single line: '2234'
Test #35:
score: 0
Accepted
time: 7ms
memory: 8200kb
input:
35
output:
12234
result:
ok single line: '12234'
Test #36:
score: 0
Accepted
time: 5ms
memory: 8144kb
input:
36
output:
334
result:
ok single line: '334'
Test #37:
score: 0
Accepted
time: 8ms
memory: 8124kb
input:
37
output:
1334
result:
ok single line: '1334'
Test #38:
score: 0
Accepted
time: 11ms
memory: 8076kb
input:
38
output:
2334
result:
ok single line: '2334'
Test #39:
score: 0
Accepted
time: 14ms
memory: 8208kb
input:
39
output:
12334
result:
ok single line: '12334'
Test #40:
score: 0
Accepted
time: 8ms
memory: 8204kb
input:
40
output:
22334
result:
ok single line: '22334'
Test #41:
score: 0
Accepted
time: 9ms
memory: 8084kb
input:
41
output:
122334
result:
ok single line: '122334'
Test #42:
score: 0
Accepted
time: 11ms
memory: 8124kb
input:
42
output:
3334
result:
ok single line: '3334'
Test #43:
score: 0
Accepted
time: 11ms
memory: 8152kb
input:
43
output:
13334
result:
ok single line: '13334'
Test #44:
score: 0
Accepted
time: 20ms
memory: 8212kb
input:
44
output:
23334
result:
ok single line: '23334'
Test #45:
score: 0
Accepted
time: 14ms
memory: 8084kb
input:
45
output:
123334
result:
ok single line: '123334'
Test #46:
score: 0
Accepted
time: 12ms
memory: 8144kb
input:
46
output:
223334
result:
ok single line: '223334'
Test #47:
score: 0
Accepted
time: 17ms
memory: 8140kb
input:
47
output:
1223334
result:
ok single line: '1223334'
Test #48:
score: 0
Accepted
time: 17ms
memory: 8140kb
input:
48
output:
44
result:
ok single line: '44'
Test #49:
score: 0
Accepted
time: 9ms
memory: 8084kb
input:
49
output:
144
result:
ok single line: '144'
Test #50:
score: 0
Accepted
time: 6ms
memory: 8140kb
input:
50
output:
244
result:
ok single line: '244'
Test #51:
score: 0
Accepted
time: 11ms
memory: 8460kb
input:
1000000000
output:
223345555566667777888888999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999...
result:
ok single line: '223345555566667777888888999999...9999999999999999999999999999999'
Test #52:
score: 0
Accepted
time: 19ms
memory: 8424kb
input:
999999999
output:
123345555566667777888888999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999...
result:
ok single line: '123345555566667777888888999999...9999999999999999999999999999999'
Test #53:
score: 0
Accepted
time: 17ms
memory: 8456kb
input:
999999998
output:
233455555666677778888889999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999...
result:
ok single line: '233455555666677778888889999999...9999999999999999999999999999999'
Test #54:
score: 0
Accepted
time: 10ms
memory: 8428kb
input:
999999997
output:
133455555666677778888889999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999...
result:
ok single line: '133455555666677778888889999999...9999999999999999999999999999999'
Test #55:
score: 0
Accepted
time: 18ms
memory: 8456kb
input:
999999996
output:
334555556666777788888899999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999...
result:
ok single line: '334555556666777788888899999999...9999999999999999999999999999999'
Test #56:
score: 0
Accepted
time: 13ms
memory: 8536kb
input:
999999995
output:
122345555566667777888888999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999...
result:
ok single line: '122345555566667777888888999999...9999999999999999999999999999999'
Test #57:
score: 0
Accepted
time: 0ms
memory: 8520kb
input:
999999994
output:
223455555666677778888889999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999...
result:
ok single line: '223455555666677778888889999999...9999999999999999999999999999999'
Test #58:
score: 0
Accepted
time: 9ms
memory: 8632kb
input:
999999993
output:
123455555666677778888889999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999...
result:
ok single line: '123455555666677778888889999999...9999999999999999999999999999999'
Test #59:
score: 0
Accepted
time: 13ms
memory: 8572kb
input:
999999992
output:
234555556666777788888899999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999...
result:
ok single line: '234555556666777788888899999999...9999999999999999999999999999999'
Test #60:
score: 0
Accepted
time: 11ms
memory: 8424kb
input:
999999991
output:
134555556666777788888899999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999...
result:
ok single line: '134555556666777788888899999999...9999999999999999999999999999999'
Test #61:
score: 0
Accepted
time: 17ms
memory: 8452kb
input:
999999990
output:
345555566667777888888999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999...
result:
ok single line: '345555566667777888888999999999...9999999999999999999999999999999'
Test #62:
score: 0
Accepted
time: 9ms
memory: 8628kb
input:
999999989
output:
122455555666677778888889999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999...
result:
ok single line: '122455555666677778888889999999...9999999999999999999999999999999'
Test #63:
score: 0
Accepted
time: 10ms
memory: 8548kb
input:
999999988
output:
224555556666777788888899999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999...
result:
ok single line: '224555556666777788888899999999...9999999999999999999999999999999'
Test #64:
score: 0
Accepted
time: 14ms
memory: 8456kb
input:
999999987
output:
124555556666777788888899999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999...
result:
ok single line: '124555556666777788888899999999...9999999999999999999999999999999'
Test #65:
score: 0
Accepted
time: 13ms
memory: 8628kb
input:
999999986
output:
245555566667777888888999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999...
result:
ok single line: '245555566667777888888999999999...9999999999999999999999999999999'
Test #66:
score: 0
Accepted
time: 12ms
memory: 8568kb
input:
999999985
output:
145555566667777888888999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999...
result:
ok single line: '145555566667777888888999999999...9999999999999999999999999999999'
Test #67:
score: 0
Accepted
time: 14ms
memory: 8496kb
input:
999999984
output:
455555666677778888889999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999...
result:
ok single line: '455555666677778888889999999999...9999999999999999999999999999999'
Test #68:
score: 0
Accepted
time: 9ms
memory: 8456kb
input:
999999983
output:
122333555556666777788888899999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999...
result:
ok single line: '122333555556666777788888899999...9999999999999999999999999999999'
Test #69:
score: 0
Accepted
time: 11ms
memory: 8556kb
input:
999999982
output:
223335555566667777888888999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999...
result:
ok single line: '223335555566667777888888999999...9999999999999999999999999999999'
Test #70:
score: 0
Accepted
time: 15ms
memory: 8520kb
input:
999999981
output:
123335555566667777888888999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999...
result:
ok single line: '123335555566667777888888999999...9999999999999999999999999999999'
Test #71:
score: 0
Accepted
time: 6ms
memory: 8140kb
input:
564
output:
334445555
result:
ok single line: '334445555'
Test #72:
score: 0
Accepted
time: 16ms
memory: 8152kb
input:
889
output:
14456
result:
ok single line: '14456'
Test #73:
score: 0
Accepted
time: 7ms
memory: 8144kb
input:
398
output:
2334555
result:
ok single line: '2334555'
Test #74:
score: 0
Accepted
time: 5ms
memory: 8084kb
input:
446
output:
233444555
result:
ok single line: '233444555'
Test #75:
score: 0
Accepted
time: 12ms
memory: 8144kb
input:
521
output:
1223345555
result:
ok single line: '1223345555'
Test #76:
score: 0
Accepted
time: 7ms
memory: 8124kb
input:
100516
output:
2244455566666677788
result:
ok single line: '2244455566666677788'
Test #77:
score: 0
Accepted
time: 19ms
memory: 8144kb
input:
65430
output:
345555566666677778
result:
ok single line: '345555566666677778'
Test #78:
score: 0
Accepted
time: 10ms
memory: 8132kb
input:
97714
output:
223455556677788
result:
ok single line: '223455556677788'
Test #79:
score: 0
Accepted
time: 13ms
memory: 8128kb
input:
57875
output:
12234556667778
result:
ok single line: '12234556667778'
Test #80:
score: 0
Accepted
time: 9ms
memory: 8196kb
input:
84854
output:
233555556666688
result:
ok single line: '233555556666688'
Test #81:
score: 0
Accepted
time: 10ms
memory: 8448kb
input:
754235334
output:
344666666788889999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999...
result:
ok single line: '344666666788889999999999999999...9999999999999999999999999999999'
Test #82:
score: 0
Accepted
time: 17ms
memory: 8448kb
input:
851359103
output:
122333566689999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999...
result:
ok single line: '122333566689999999999999999999...9999999999999999999999999999999'
Test #83:
score: 0
Accepted
time: 15ms
memory: 8368kb
input:
972743444
output:
233345556666777788888999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999...
result:
ok single line: '233345556666777788888999999999...9999999999999999999999999999999'
Test #84:
score: 0
Accepted
time: 5ms
memory: 8248kb
input:
444976792
output:
223344445788999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999...
result:
ok single line: '223344445788999999999999999999...9999999999999999999999999999999'
Test #85:
score: 0
Accepted
time: 4ms
memory: 8200kb
input:
225579111
output:
123344445666667777788888999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999...
result:
ok single line: '123344445666667777788888999999...9999999999999999999999999999999'
Test #86:
score: 0
Accepted
time: 1ms
memory: 8036kb
input:
120
output:
5
result:
ok single line: '5'
Test #87:
score: 0
Accepted
time: 9ms
memory: 8148kb
input:
119
output:
1223334444
result:
ok single line: '1223334444'
Test #88:
score: 0
Accepted
time: 8ms
memory: 8144kb
input:
121
output:
15
result:
ok single line: '15'
Test #89:
score: 0
Accepted
time: 18ms
memory: 8064kb
input:
720
output:
6
result:
ok single line: '6'
Test #90:
score: 0
Accepted
time: 1ms
memory: 8144kb
input:
719
output:
122333444455555
result:
ok single line: '122333444455555'
Test #91:
score: 0
Accepted
time: 13ms
memory: 8124kb
input:
721
output:
16
result:
ok single line: '16'
Test #92:
score: 0
Accepted
time: 17ms
memory: 8144kb
input:
5040
output:
7
result:
ok single line: '7'
Test #93:
score: 0
Accepted
time: 8ms
memory: 8100kb
input:
5039
output:
122333444455555666666
result:
ok single line: '122333444455555666666'
Test #94:
score: 0
Accepted
time: 8ms
memory: 8136kb
input:
5041
output:
17
result:
ok single line: '17'
Test #95:
score: 0
Accepted
time: 12ms
memory: 8132kb
input:
40320
output:
8
result:
ok single line: '8'
Test #96:
score: 0
Accepted
time: 12ms
memory: 8144kb
input:
40319
output:
1223334444555556666667777777
result:
ok single line: '1223334444555556666667777777'
Test #97:
score: 0
Accepted
time: 2ms
memory: 8136kb
input:
40321
output:
18
result:
ok single line: '18'
Test #98:
score: 0
Accepted
time: 4ms
memory: 8204kb
input:
362880
output:
9
result:
ok single line: '9'
Test #99:
score: 0
Accepted
time: 6ms
memory: 8100kb
input:
362879
output:
122333444455555666666777777788888888
result:
ok single line: '122333444455555666666777777788888888'
Test #100:
score: 0
Accepted
time: 15ms
memory: 8204kb
input:
362881
output:
19
result:
ok single line: '19'