叙利亚战损版,凑合着看吧 摘要:解题思路:注意事项:分解百位数每个数字参考代码:#include<stdio.h>int main(){ int n,x,y,z,t; scanf("%d",&n); x=n/100…… 题解列表 2022年06月26日 0 点赞 0 评论 733 浏览 评分:0.0
新手学习,C++解决 摘要:解题思路:pow求立方注意事项:参考代码:#include<iostream>#include<cmath>using namespace std;int main(){ int n; i…… 题解列表 2022年06月07日 0 点赞 0 评论 731 浏览 评分:9.9
C语言训练-"水仙花数"问题1一般思路 摘要:解题思路:根据“水仙花数”的定义,判断一个数是否为“水仙花数”,最重要的是要把给出的三位数的个位、十位、百位分别拆分,并求其立方和(设为s),若s与给出的三位数相等, 三位数为“水仙花数”,反之,则不…… 题解列表 2022年05月27日 0 点赞 0 评论 1009 浏览 评分:0.0
输入超过三位数的简单思路 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a, b, s, g; scanf("%d", &a); b = a / 100; s…… 题解列表 2022年05月19日 0 点赞 0 评论 544 浏览 评分:0.0
C语言训练-"水仙花数"问题1 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<fstream>#include<algorithm>using namespace std;long long n…… 题解列表 2022年05月18日 0 点赞 0 评论 430 浏览 评分:0.0
居然还是输入和输出的问题卡住了 摘要:解题思路:注意事项:输入也要注意,当成字符串输入就可以拆分开不用去求参考代码:a=input()su=0for i in a: su+=int(i)**3if su==int(a): pr…… 题解列表 2022年05月13日 0 点赞 0 评论 523 浏览 评分:0.0
while循环求解 摘要:解题思路:求每一位数的3次方的和注意事项:由于输入的数被/10了3次,所有最后在比对的时候用的是一开始赋值的b参考代码:#include "stdio.h"#include "math.h"int m…… 题解列表 2022年05月08日 0 点赞 0 评论 559 浏览 评分:0.0
C语言训练-"水仙花数"问题1 摘要:解题思路:模拟注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int a,b,c,d;int main(){ cin>>a; b=…… 题解列表 2022年05月05日 0 点赞 0 评论 531 浏览 评分:0.0
C语言训练-"水仙花数"问题1 解题思路:对于这种要操作一个数多个位数的题目,我们优先选择拆分各位数和放入字符串数组的方法思路进行解决,但对于该题来说,应用字符串的方法解题,会受atoi函数声明不能带有未知量而不能进行for循环语句操作,需要逐个转化,而使得解题过程繁琐,算法不够简洁。 题解列表 2022年05月02日 0 点赞 0 评论 751 浏览 评分:9.9