fork(2) download
  1. def ceil(x, base):
  2. return x if x % base == 0 else (x // base + 1) * base
  3.  
  4. from functools import partial
  5. ceil5 = partial(ceil, base=5)
  6.  
  7. for i in range(25):
  8. print(i, ceil5(i))
Success #stdin #stdout 0.01s 28384KB
stdin
Standard input is empty
stdout
0 0
1 5
2 5
3 5
4 5
5 5
6 10
7 10
8 10
9 10
10 10
11 15
12 15
13 15
14 15
15 15
16 20
17 20
18 20
19 20
20 20
21 25
22 25
23 25
24 25