2844: 大整数的因子 文章 > 编写题解 解题思路:直接看代码注释吧。注意事项:处理长整数问题的思路都一样,先把长整数当成字符存入字符型数组,然后用字符-‘0’的方法将字符转化成数组存入整型数组中,再将一个个分散的数字拼接成一个整数,进行下一步处理。参考代码:#include#includeintmain 题解列表 2025年12月16日 1 点赞 0 评论 334 浏览 评分:10.0
大整数的因子 解题思路:注意事项:参考代码:importjava.util.Scanner;importjava.math.BigInteger;publicclassMain{publicstaticvoidmain(String[]args){Scannersc=newScanner(System.in);Bi 题解列表 2025年05月29日 1 点赞 0 评论 484 浏览 评分:10.0
python : 暴力解题,非常简单,初学者友好 解题思路:注意事项:我是Python初学者,我的C语言思维比较严重!!!参考代码:c=int(input())n=0ko=[]//我把这个空列表当C语言数组使用了forkinrange(2,10):ifc%k==0:ko.append(k)n+=1ifn==0:print("none")else:pr 题解列表 2025年03月06日 0 点赞 0 评论 765 浏览 评分:0.0
我直接ifififif 摘要:```cpp#include #include using namespace std;int main(){ string s; int a[50]={0},…… 题解列表 2025年02月18日 0 点赞 0 评论 485 浏览 评分:0.0
大整数因子 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){ int c[30],l,i,j,yu,cn=0,n[9]; char a[3…… 题解列表 2024年10月10日 0 点赞 0 评论 564 浏览 评分:0.0
对题2844:数组之间的转化以及数组计算 摘要:解题思路:首先,需要定义一个字符数组,用于输入大整数,并将其储存在数组中;然后再定义一个整型数组,利用ASCII码之间的关系,将字符数组中每个元素减轻‘0’,即可将输入的整数储存在数组中,用来进行后续…… 题解列表 2024年09月14日 0 点赞 0 评论 684 浏览 评分:9.9
大整数的因子 摘要:解题思路:注意事项:参考代码:#include <iostream> #include <stdlib.h> #include <stdio.h> using namespace std; …… 题解列表 2024年08月16日 0 点赞 0 评论 519 浏览 评分:9.9
2844: 大整数的因子 摘要:解题思路:注意事项:参考代码:flag = Truen = int(input())for i in range(2,10,1): if n % i == 0: if flag: …… 题解列表 2024年07月31日 0 点赞 0 评论 577 浏览 评分:0.0
用字符串求大整数的因子 摘要:解题思路:用字符串输入大整数,转化为数存放到数组中。正序从高位开始求余,判断最后余数是否为0注意事项: int t=c*10+a[j];//高位余数乘10加到低位 c=t%i;/…… 题解列表 2024年05月13日 0 点赞 0 评论 574 浏览 评分:0.0
2844: 大整数的因子 (记录问题,待解决) 可以通过全部测试点的代码:```c#include#includeintmain(){charc1[31]={'0'};//注意0intc[31]={0},s,i,j,lc,found=0,count=0;//注意0scanf("%s",c1);lc=strlen(c1);//注意0、注意1与注意2f 题解列表 2024年04月27日 0 点赞 0 评论 668 浏览 评分:0.0