Rounding

CF1857B Maximum Rounding

题目大意 给定一个自然数 \(n\),可以对任意一位进行四舍五入,可以进行任意次,求能得到的最大数。 \(n\) 的长度不超过 \(2\times 10^5\),没有前导零。 solution 首先,选择四舍五入的数一定 \(\ge 5\),不然对答案没有贡献。 其次,高位的数可能会受到低位的进位, ......
Rounding Maximum 1857B 1857 CF

CF1857B Maximum Rounding 题解

[题面](https://codeforces.com/problemset/problem/1857/B) ## 题目大意 给定 $T$ 组数据,每组数据一个自然数 $n$,可以多次选择第 $k$ 位数进行四舍五入,求出四舍五入后该数的最大值。 ## 分析思路 思想:**贪心**。 这里给定了两种 ......
题解 Rounding Maximum 1857B 1857

Python - Ridiculous Rounding

Python 3 uses “Banker’s Rounding” which is defined like this: “Exact halfway cases are now rounded to the nearest even result instead of away from zer ......
Ridiculous Rounding Python
共3篇  :1/1页 首页上一页1下一页尾页