Submission #22625003
Source Code Expand
s = input()
if s.count("o") > 4:
print(0)
else:
o_index = []
q_index = []
x_index = []
for m in range(10):
if s[m] == "o":
o_index.append(m)
elif s[m] == "?":
q_index.append(m)
elif s[m] == "x":
x_index.append(m)
# print(o_index, q_index, x_index)
k1, k2, k3, k4 = 0, 0, 0, 0
ans = 0
for i in range(10):
k1 = (k1 + 1) % 10
for j in range(10):
k2 = (k2 + 1) % 10
for k in range(10):
k3 = (k3 + 1) % 10
for l in range(10):
noskipflag = True
string = "".join(list(map(str, [k1, k2, k3, k4])))
if len(x_index) > 0:
for x in x_index:
if str(x) in string:
noskipflag = False
break
if noskipflag and len(o_index) > 0:
for o in o_index:
if str(o) not in string:
noskipflag = False
break
# if noskipflag and len(q_index) > 0:
# for q in q_index:
# if str(q) in string:
# print(string, "True")
# ans += 1
# break
if noskipflag:
# print(string, "True")
ans += 1
k4 = (k4 + 1) % 10
print(ans)
Submission Info
| Submission Time | |
|---|---|
| Task | C - Secret Number |
| User | QmanEnobikto |
| Language | Python (3.8.2) |
| Score | 300 |
| Code Size | 1668 Byte |
| Status | AC |
| Exec Time | 47 ms |
| Memory | 9176 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 300 / 300 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | example0.txt, example1.txt, example2.txt |
| All | 000.txt, 001.txt, 002.txt, 003.txt, 004.txt, 005.txt, 006.txt, 007.txt, 008.txt, 009.txt, 010.txt, 011.txt, 012.txt, 013.txt, 014.txt, 015.txt, example0.txt, example1.txt, example2.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 000.txt | AC | 47 ms | 9000 KiB |
| 001.txt | AC | 38 ms | 9000 KiB |
| 002.txt | AC | 46 ms | 9008 KiB |
| 003.txt | AC | 44 ms | 9000 KiB |
| 004.txt | AC | 43 ms | 8996 KiB |
| 005.txt | AC | 22 ms | 9000 KiB |
| 006.txt | AC | 47 ms | 9044 KiB |
| 007.txt | AC | 43 ms | 9012 KiB |
| 008.txt | AC | 44 ms | 8908 KiB |
| 009.txt | AC | 46 ms | 9176 KiB |
| 010.txt | AC | 21 ms | 9120 KiB |
| 011.txt | AC | 46 ms | 9124 KiB |
| 012.txt | AC | 39 ms | 8900 KiB |
| 013.txt | AC | 46 ms | 8900 KiB |
| 014.txt | AC | 39 ms | 9044 KiB |
| 015.txt | AC | 44 ms | 8908 KiB |
| example0.txt | AC | 45 ms | 8888 KiB |
| example1.txt | AC | 20 ms | 9120 KiB |
| example2.txt | AC | 45 ms | 8900 KiB |