Skip to content

Commit

Permalink
Add unfinished solution
Browse files Browse the repository at this point in the history
  • Loading branch information
deniscostadsc committed Jul 18, 2024
1 parent 61a0352 commit fd7fe08
Show file tree
Hide file tree
Showing 7 changed files with 477 additions and 0 deletions.
32 changes: 32 additions & 0 deletions solutions/beecrowd/2369/2369.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import sys

MAX_RANGE_1 = 9
MAX_RANGE_2 = 29
MAX_RANGE_3 = 100


for line in sys.stdin:
n = int(line)
total_bill = 0

if n <= MAX_RANGE_1:
# print('if')
total_bill = 7
elif n <= MAX_RANGE_2:
total_bill = 7 + (n - MAX_RANGE_1) * 1
# print(f'total_bill {total_bill}')
# print(f'n {n}')
# print(f'n - MAX_RANGE_1 {n - MAX_RANGE_1}')
elif n <= MAX_RANGE_3:
total_bill = (
7 + ((n - MAX_RANGE_1) * 1) + ((n - MAX_RANGE_1 - MAX_RANGE_2) * 2)
)
else:
total_bill = (
7
+ ((n - MAX_RANGE_1) * 1)
+ ((n - MAX_RANGE_1 - MAX_RANGE_2) * 2)
+ ((n - MAX_RANGE_1 - MAX_RANGE_2 - MAX_RANGE_3) * 5)
)

print(total_bill)
Empty file added solutions/beecrowd/2369/WRONG
Empty file.
Binary file added solutions/beecrowd/2369/imgs/UOJ_169_A.webp
Binary file not shown.
201 changes: 201 additions & 0 deletions solutions/beecrowd/2369/in.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
Loading

0 comments on commit fd7fe08

Please sign in to comment.