Submission #683148

# Submission time Handle Problem Language Result Execution time Memory
683148 2023-01-17T20:10:13 Z beaconmc Homework (CEOI22_homework) PyPy 3
53 / 100
1000 ms 339416 KB
s = input()
n = 0
for i in s:
    if i == "?":
        n += 1
s = s.replace("?", "'?'")

mini = min
maxi = max

def min(a,b):
    if a=="?" or b=="?":
        return 1
    else:
        return mini(a,b)

def max(a,b):
    if a=="?":
        a = 1
    if b=="?":
        b = 1
    return a+b

l = eval(s)

def max(a,b):
    if a=="?" or b=="?":
        return 1
    else:
        return mini(a,b)

def min(a,b):
    if a=="?":
        a = 1
    if b=="?":
        b = 1
    return a+b
r = n-eval(s)+1
print(r-l+1)
# Verdict Execution time Memory Grader output
1 Correct 35 ms 18220 KB Output is correct
2 Correct 39 ms 18192 KB Output is correct
3 Correct 35 ms 18248 KB Output is correct
4 Correct 45 ms 18184 KB Output is correct
5 Correct 37 ms 18136 KB Output is correct
6 Correct 34 ms 18128 KB Output is correct
7 Correct 34 ms 18196 KB Output is correct
8 Correct 39 ms 18180 KB Output is correct
9 Correct 34 ms 18160 KB Output is correct
10 Correct 33 ms 18232 KB Output is correct
11 Correct 33 ms 18224 KB Output is correct
12 Correct 46 ms 18224 KB Output is correct
13 Correct 45 ms 18220 KB Output is correct
14 Correct 35 ms 18156 KB Output is correct
15 Correct 37 ms 18204 KB Output is correct
16 Correct 39 ms 18140 KB Output is correct
17 Correct 34 ms 18180 KB Output is correct
18 Correct 34 ms 18232 KB Output is correct
19 Correct 34 ms 18184 KB Output is correct
20 Correct 35 ms 18228 KB Output is correct
21 Correct 33 ms 18228 KB Output is correct
22 Correct 35 ms 18204 KB Output is correct
23 Correct 34 ms 18200 KB Output is correct
24 Correct 47 ms 18180 KB Output is correct
25 Correct 34 ms 18140 KB Output is correct
26 Correct 38 ms 18196 KB Output is correct
27 Correct 37 ms 18216 KB Output is correct
28 Correct 35 ms 18200 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 35 ms 18220 KB Output is correct
2 Correct 39 ms 18192 KB Output is correct
3 Correct 35 ms 18248 KB Output is correct
4 Correct 45 ms 18184 KB Output is correct
5 Correct 37 ms 18136 KB Output is correct
6 Correct 34 ms 18128 KB Output is correct
7 Correct 34 ms 18196 KB Output is correct
8 Correct 39 ms 18180 KB Output is correct
9 Correct 34 ms 18160 KB Output is correct
10 Correct 33 ms 18232 KB Output is correct
11 Correct 33 ms 18224 KB Output is correct
12 Correct 46 ms 18224 KB Output is correct
13 Correct 45 ms 18220 KB Output is correct
14 Correct 35 ms 18156 KB Output is correct
15 Correct 37 ms 18204 KB Output is correct
16 Correct 39 ms 18140 KB Output is correct
17 Correct 34 ms 18180 KB Output is correct
18 Correct 34 ms 18232 KB Output is correct
19 Correct 34 ms 18184 KB Output is correct
20 Correct 35 ms 18228 KB Output is correct
21 Correct 33 ms 18228 KB Output is correct
22 Correct 35 ms 18204 KB Output is correct
23 Correct 34 ms 18200 KB Output is correct
24 Correct 47 ms 18180 KB Output is correct
25 Correct 34 ms 18140 KB Output is correct
26 Correct 38 ms 18196 KB Output is correct
27 Correct 37 ms 18216 KB Output is correct
28 Correct 35 ms 18200 KB Output is correct
29 Correct 33 ms 18204 KB Output is correct
30 Correct 35 ms 18112 KB Output is correct
31 Correct 39 ms 18124 KB Output is correct
32 Correct 36 ms 18176 KB Output is correct
33 Correct 34 ms 18228 KB Output is correct
34 Correct 41 ms 18168 KB Output is correct
35 Correct 34 ms 18172 KB Output is correct
36 Correct 34 ms 18228 KB Output is correct
37 Correct 33 ms 18132 KB Output is correct
38 Correct 43 ms 18180 KB Output is correct
39 Correct 33 ms 18176 KB Output is correct
40 Correct 35 ms 18184 KB Output is correct
41 Correct 33 ms 18228 KB Output is correct
42 Correct 35 ms 18228 KB Output is correct
43 Correct 41 ms 18136 KB Output is correct
44 Correct 35 ms 18236 KB Output is correct
45 Correct 36 ms 18176 KB Output is correct
46 Correct 38 ms 18188 KB Output is correct
47 Correct 35 ms 18180 KB Output is correct
48 Correct 34 ms 18196 KB Output is correct
49 Correct 36 ms 18220 KB Output is correct
50 Correct 34 ms 18284 KB Output is correct
51 Correct 34 ms 18164 KB Output is correct
52 Correct 34 ms 18212 KB Output is correct
53 Correct 36 ms 18300 KB Output is correct
54 Correct 35 ms 18196 KB Output is correct
55 Correct 36 ms 18188 KB Output is correct
56 Correct 34 ms 18192 KB Output is correct
# Verdict Execution time Memory Grader output
1 Execution timed out 1050 ms 339416 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 35 ms 18220 KB Output is correct
2 Correct 39 ms 18192 KB Output is correct
3 Correct 35 ms 18248 KB Output is correct
4 Correct 45 ms 18184 KB Output is correct
5 Correct 37 ms 18136 KB Output is correct
6 Correct 34 ms 18128 KB Output is correct
7 Correct 34 ms 18196 KB Output is correct
8 Correct 39 ms 18180 KB Output is correct
9 Correct 34 ms 18160 KB Output is correct
10 Correct 33 ms 18232 KB Output is correct
11 Correct 33 ms 18224 KB Output is correct
12 Correct 46 ms 18224 KB Output is correct
13 Correct 45 ms 18220 KB Output is correct
14 Correct 35 ms 18156 KB Output is correct
15 Correct 37 ms 18204 KB Output is correct
16 Correct 39 ms 18140 KB Output is correct
17 Correct 34 ms 18180 KB Output is correct
18 Correct 34 ms 18232 KB Output is correct
19 Correct 34 ms 18184 KB Output is correct
20 Correct 35 ms 18228 KB Output is correct
21 Correct 33 ms 18228 KB Output is correct
22 Correct 35 ms 18204 KB Output is correct
23 Correct 34 ms 18200 KB Output is correct
24 Correct 47 ms 18180 KB Output is correct
25 Correct 34 ms 18140 KB Output is correct
26 Correct 38 ms 18196 KB Output is correct
27 Correct 37 ms 18216 KB Output is correct
28 Correct 35 ms 18200 KB Output is correct
29 Correct 33 ms 18204 KB Output is correct
30 Correct 35 ms 18112 KB Output is correct
31 Correct 39 ms 18124 KB Output is correct
32 Correct 36 ms 18176 KB Output is correct
33 Correct 34 ms 18228 KB Output is correct
34 Correct 41 ms 18168 KB Output is correct
35 Correct 34 ms 18172 KB Output is correct
36 Correct 34 ms 18228 KB Output is correct
37 Correct 33 ms 18132 KB Output is correct
38 Correct 43 ms 18180 KB Output is correct
39 Correct 33 ms 18176 KB Output is correct
40 Correct 35 ms 18184 KB Output is correct
41 Correct 33 ms 18228 KB Output is correct
42 Correct 35 ms 18228 KB Output is correct
43 Correct 41 ms 18136 KB Output is correct
44 Correct 35 ms 18236 KB Output is correct
45 Correct 36 ms 18176 KB Output is correct
46 Correct 38 ms 18188 KB Output is correct
47 Correct 35 ms 18180 KB Output is correct
48 Correct 34 ms 18196 KB Output is correct
49 Correct 36 ms 18220 KB Output is correct
50 Correct 34 ms 18284 KB Output is correct
51 Correct 34 ms 18164 KB Output is correct
52 Correct 34 ms 18212 KB Output is correct
53 Correct 36 ms 18300 KB Output is correct
54 Correct 35 ms 18196 KB Output is correct
55 Correct 36 ms 18188 KB Output is correct
56 Correct 34 ms 18192 KB Output is correct
57 Correct 53 ms 23124 KB Output is correct
58 Correct 55 ms 23040 KB Output is correct
59 Correct 59 ms 23056 KB Output is correct
60 Correct 59 ms 23176 KB Output is correct
61 Correct 56 ms 23160 KB Output is correct
62 Correct 50 ms 23560 KB Output is correct
63 Correct 54 ms 23860 KB Output is correct
64 Correct 52 ms 23568 KB Output is correct
65 Correct 50 ms 23664 KB Output is correct
66 Correct 50 ms 23616 KB Output is correct
67 Correct 53 ms 23080 KB Output is correct
68 Correct 56 ms 23104 KB Output is correct
69 Correct 51 ms 23080 KB Output is correct
70 Correct 49 ms 23076 KB Output is correct
71 Correct 50 ms 23024 KB Output is correct
72 Correct 52 ms 24868 KB Output is correct
73 Correct 52 ms 24928 KB Output is correct
74 Correct 53 ms 25228 KB Output is correct
75 Correct 53 ms 25124 KB Output is correct
76 Correct 56 ms 24932 KB Output is correct
77 Correct 49 ms 23056 KB Output is correct
78 Correct 53 ms 23048 KB Output is correct
79 Correct 54 ms 23048 KB Output is correct
80 Correct 52 ms 23164 KB Output is correct
81 Correct 53 ms 24284 KB Output is correct
82 Correct 51 ms 24232 KB Output is correct
83 Correct 44 ms 20860 KB Output is correct
84 Correct 43 ms 20868 KB Output is correct
85 Correct 44 ms 20824 KB Output is correct
86 Correct 33 ms 18136 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 35 ms 18220 KB Output is correct
2 Correct 39 ms 18192 KB Output is correct
3 Correct 35 ms 18248 KB Output is correct
4 Correct 45 ms 18184 KB Output is correct
5 Correct 37 ms 18136 KB Output is correct
6 Correct 34 ms 18128 KB Output is correct
7 Correct 34 ms 18196 KB Output is correct
8 Correct 39 ms 18180 KB Output is correct
9 Correct 34 ms 18160 KB Output is correct
10 Correct 33 ms 18232 KB Output is correct
11 Correct 33 ms 18224 KB Output is correct
12 Correct 46 ms 18224 KB Output is correct
13 Correct 45 ms 18220 KB Output is correct
14 Correct 35 ms 18156 KB Output is correct
15 Correct 37 ms 18204 KB Output is correct
16 Correct 39 ms 18140 KB Output is correct
17 Correct 34 ms 18180 KB Output is correct
18 Correct 34 ms 18232 KB Output is correct
19 Correct 34 ms 18184 KB Output is correct
20 Correct 35 ms 18228 KB Output is correct
21 Correct 33 ms 18228 KB Output is correct
22 Correct 35 ms 18204 KB Output is correct
23 Correct 34 ms 18200 KB Output is correct
24 Correct 47 ms 18180 KB Output is correct
25 Correct 34 ms 18140 KB Output is correct
26 Correct 38 ms 18196 KB Output is correct
27 Correct 37 ms 18216 KB Output is correct
28 Correct 35 ms 18200 KB Output is correct
29 Correct 33 ms 18204 KB Output is correct
30 Correct 35 ms 18112 KB Output is correct
31 Correct 39 ms 18124 KB Output is correct
32 Correct 36 ms 18176 KB Output is correct
33 Correct 34 ms 18228 KB Output is correct
34 Correct 41 ms 18168 KB Output is correct
35 Correct 34 ms 18172 KB Output is correct
36 Correct 34 ms 18228 KB Output is correct
37 Correct 33 ms 18132 KB Output is correct
38 Correct 43 ms 18180 KB Output is correct
39 Correct 33 ms 18176 KB Output is correct
40 Correct 35 ms 18184 KB Output is correct
41 Correct 33 ms 18228 KB Output is correct
42 Correct 35 ms 18228 KB Output is correct
43 Correct 41 ms 18136 KB Output is correct
44 Correct 35 ms 18236 KB Output is correct
45 Correct 36 ms 18176 KB Output is correct
46 Correct 38 ms 18188 KB Output is correct
47 Correct 35 ms 18180 KB Output is correct
48 Correct 34 ms 18196 KB Output is correct
49 Correct 36 ms 18220 KB Output is correct
50 Correct 34 ms 18284 KB Output is correct
51 Correct 34 ms 18164 KB Output is correct
52 Correct 34 ms 18212 KB Output is correct
53 Correct 36 ms 18300 KB Output is correct
54 Correct 35 ms 18196 KB Output is correct
55 Correct 36 ms 18188 KB Output is correct
56 Correct 34 ms 18192 KB Output is correct
57 Execution timed out 1050 ms 339416 KB Time limit exceeded
58 Halted 0 ms 0 KB -