求小数的某一位 分数a/b化为小数后,小数点后第n位的数字是多少? 摘要:解题思路:由于double是浮点型,如果强制转化成int会造成精度缺失,这可能是大部分人会错一个答案的原因。在这里采用的方法是类似于手算小学除法题。比如1➗3。我们都知道,1比3小,所以要对1进位取1…… 题解列表 2025年07月24日 1 点赞 0 评论 106 浏览 评分:0.0
循环乘以10再求模,直到移动到整除结束 摘要:解题思路:1.转换为分数核心逻辑是循环乘以10再求模,直到移动到整除结束2.遍历循环2步:逐位计算:x=a*10/b;更新余数:a=a*10%b;注意事项:更新的次数由n决定。参考代码:#includ…… 题解列表 2024年12月05日 0 点赞 0 评论 230 浏览 评分:0.0
编写题解 3013: 求小数的某一位 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){int a,b,n,m;cin>>a>>b>>n;m=a*1.…… 题解列表 2024年06月05日 0 点赞 0 评论 429 浏览 评分:0.0
求小数的某一位 3013: 摘要:解题思路:#include <iostream>using namespace std;int main(){ long long a,b,n,c; cin>>a>>b>>n; fo…… 题解列表 2024年01月16日 0 点赞 0 评论 139 浏览 评分:0.0
题解 3013: 求小数的某一位 标题 摘要:解题思路:注意事项:参考代码:#include <iostream>using namespace std;int main(){ long long a,b,n,c; cin>>a>>b…… 题解列表 2024年01月16日 0 点赞 0 评论 214 浏览 评分:0.0
3013: 求小数的某一位 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ long long a,b,n,c; cin>…… 题解列表 2024年01月16日 0 点赞 0 评论 147 浏览 评分:0.0
题解 3013: 求小数的某一位 摘要:解题思路:用for循环来模拟除法的过程注意事项:注意:本题不需要浮点型,用sum累加器存储商,最后输出 。 …… 题解列表 2024年01月16日 0 点赞 0 评论 120 浏览 评分:0.0
题解 3013: 求小数的某一位 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ int a,b,n,c; cin>>a>>b>…… 题解列表 2024年01月16日 0 点赞 0 评论 158 浏览 评分:0.0
3013: 求小数的某一位 摘要:解题思路:注意事项:这里的cout要在外面写a的值可以改变参考代码:#include <bits/stdc++.h>using namespace std;int main(){ long lo…… 题解列表 2024年01月15日 0 点赞 0 评论 199 浏览 评分:9.9
Yu(正确的做法)求小数的某一位 摘要:# 解题思路 **很多题解都是错误的** 首先这是循环题,很多题解不使用循环,也没有算法。 如果数据按题目给的量级,那些题解的方法不可能过,long double没有那么大的范围。 我们应该把…… 题解列表 2023年12月01日 0 点赞 0 评论 143 浏览 评分:9.9