1074: 数字整除 摘要:解题思路:用用户输入的数据取模17即可得知是否为17的倍数注意事项:1、由于输入的是大数据,即用普通的int,long等装不下,故可用字符数组的方式容纳此数2、需要明白字符数组中的值转换为int数字类…… 题解列表 2024年02月07日 2 点赞 0 评论 297 浏览 评分:10.0
1074: 数字整除——使用题目所给出的定理的方法(不使用大数除法的方法) 摘要:解题思路:定理:把一个至少两位的正整数的个位数字去掉,再从余下的数中减去个位数的5倍。当且仅当差是17的倍数时,原数也是17的倍数 。例如:2098765413第一次去掉个位数3,也就是前面的2098…… 题解列表 2024年09月29日 4 点赞 0 评论 446 浏览 评分:10.0
1074,直接通过模运算来解决 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <string.h>int isM(char *n) { int …… 题解列表 2025年05月01日 0 点赞 1 评论 35 浏览 评分:10.0
数字整除 (C++代码) 摘要:解题思路:看题目数据范围,肯定是大数啦,用字符数组读取,然后再减去‘0’就是对应的数字了。然后把每个得到的数字对17取余,余数*10到加到下一位,继续取余,最后直接判断余数是否为0就OK了。注意事项:…… 题解列表 2018年07月24日 0 点赞 1 评论 1527 浏览 评分:9.9
数字整除 (C语言代码) 摘要:#include "stdafx.h"#include "math.h"int f(double n){ int t; char a[100] = { 0 }; t = fmod(n,10); …… 题解列表 2018年10月31日 0 点赞 0 评论 1226 浏览 评分:9.9
数字整除-题解(Python代码) 摘要:请指出错误 ```python def ax(a1): a2=a1%10 a1=int(a1/10)-a2*5 if a1>9: return ax…… 题解列表 2019年11月25日 0 点赞 3 评论 1107 浏览 评分:9.9
数字整除-题解(C语言描述(这是算法题,比的是解决方案)) 摘要:```c #include #include int main() { char num[101]; while (scanf("%s", num) != EOF && …… 题解列表 2020年02月08日 0 点赞 12 评论 1159 浏览 评分:9.9
数字整除-题解(Java代码)容易理解 摘要:大家能看懂的话给个好评吧! import java.util.Scanner; import java.math.BigInteger;//导入BigInteger包 public c…… 题解列表 2020年02月27日 0 点赞 0 评论 815 浏览 评分:9.9
JakeLin-1074题-数字整除-题解(C++代码)-大数取余 摘要:```cpp #include #include #include using namespace std; const int maxn = 100 + 20; char s[maxn]…… 题解列表 2020年03月31日 0 点赞 0 评论 1205 浏览 评分:9.9
大数当小数对待,清晰易懂(21行代码)-题解(C语言代码) 摘要:##### 本文参考的是作者为“ET”的大神的思路: ###### 原文链接:https://blog.dotcpp.com/a/1782 他是用do-while实现的,在大佬的解答中,存在一个小…… 题解列表 2020年05月02日 0 点赞 8 评论 1133 浏览 评分:9.9