質問するログイン新規登録

回答編集履歴

1

d

2019/02/27 08:37

投稿

tiitoi
tiitoi

スコア21960

answer CHANGED
@@ -1,6 +1,6 @@
1
1
  ```python
2
2
  def around(x, base):
3
- return base * (x // base)
3
+ return base * int(x / base)
4
4
 
5
5
  print(around(151.266, base=0.05)) # 151.25
6
6
  print(around(151.246, base=0.05)) # 151.20000000000002