3013: 求小数的某一位 摘要:解题思路:注意事项:参考代码:a,b,n=map(int,input().split())c=float(a/b)for i in range(1,n+1): c=a*10/…… 题解列表 2025年02月14日 0 点赞 0 评论 164 浏览 评分:0.0
求小数的某一位 分数a/b化为小数后,小数点后第n位的数字是多少? 摘要:解题思路:由于double是浮点型,如果强制转化成int会造成精度缺失,这可能是大部分人会错一个答案的原因。在这里采用的方法是类似于手算小学除法题。比如1➗3。我们都知道,1比3小,所以要对1进位取1…… 题解列表 2025年07月24日 1 点赞 0 评论 107 浏览 评分:0.0
求小数的末尾3位 摘要:需要明确一点就是:无论a的多少次幂,都是末尾的数先乘以a再考虑向前进位,因此本题直接考虑每次幂的末尾3位,将每次的末尾3位乘以a循环进行b次#include<stdio.h> int main(vo…… 题解列表 2023年03月24日 0 点赞 0 评论 240 浏览 评分:2.0
求小数的某一位 摘要:解题思路:注意事项:参考代码:import java.util.Scanner;public class Main { public static void main(String[] args) {…… 题解列表 2023年10月13日 0 点赞 0 评论 172 浏览 评分:6.0
c语言代码解决问题 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n,i,t; double a, b,c; scanf("%lf %lf %d", &…… 题解列表 2023年06月16日 0 点赞 0 评论 303 浏览 评分:6.0
C语言——求小数的某一位 摘要:解题思路这个是我做这道题的思路,希望对你们有帮助。注意:这个代码不是题目的答案!!!!!!!!!#include<stdio.h>//char a[1001]={'\0'}; …… 题解列表 2022年12月31日 0 点赞 0 评论 511 浏览 评分:8.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
【稳定做法】求小数的某一位-模拟列竖式 摘要:前排题解基本用浮点数运算,但是对于 $$ n \leq 10000$$ 的数据范围来说理论上都是错误的,无论是 `double` 还是 `long double` 在 $$ 10 ^ {10000}$…… 题解列表 2023年10月30日 0 点赞 0 评论 274 浏览 评分:9.9
java--study||O.o--高精度 摘要:参考代码:import java.math.BigDecimal; import java.math.RoundingMode; import java.util.Scanner; pub…… 题解列表 2024年02月14日 0 点赞 0 评论 310 浏览 评分:9.9