小编jbr*_*rre的帖子

go中的楼层划分

我正在将一些旧的内容从 Python 翻译成 Go。在此代码中,我在 Python 中使用了向下取整除法和向下取整运算符。

d = b // c
# (c isn't a comment, I use the // operator from python)
Run Code Online (Sandbox Code Playgroud)

我的问题是,Go 中不存在这个运算符。在 Go 中翻译最简单的方法是什么?

python math go

5
推荐指数
1
解决办法
6540
查看次数

标签 统计

go ×1

math ×1

python ×1