题解 | #牛牛的小数输出#

牛牛的小数输出

https://www.nowcoder.com/practice/0454d1bd28cd499ba06afdabe0fb9caf

num1 = float(input())
print("{0:.2f}".format(num1))

python的格式化输出:https://www.runoob.com/python/att-string-format.html

全部评论

相关推荐

评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务