使用排列组合(插入0) 摘要:解题思路:使用排列组合注意事项:参考代码:#include<iostream>#include<math.h>using namespace std;int jiech(int n){ int …… 题解列表 2022年01月20日 0 点赞 0 评论 348 浏览 评分:9.9
这个为啥不行 摘要:解题思路:输入十六进制,直接输出八进制,这种方法在2080中都可以注意事项:参考代码:#include <stdio.h>int main(){ int n; scanf("%d",&n)…… 题解列表 2022年01月20日 0 点赞 4 评论 355 浏览 评分:9.9
题解 1021: [编程入门]迭代法求平方根 摘要:解题思路: 首先猜测一个值X1=a/2,然后根据迭代公式 X(n+1)=(Xn+a/Xn)/2注意事项:参考代码:public class test1021 {// 用迭代法求 平方根//…… 题解列表 2022年01月20日 0 点赞 1 评论 1167 浏览 评分:9.9
题解 1022: [编程入门]筛选N以内的素数 摘要:解题思路: 我是想着套两个for,第一个for遍历a以内的数,第二个for就是进行判断是否为素数,里面的if,如果==,就是没有能整除的数了,因此就可以输出素数。第二个if一旦取模为0,…… 题解列表 2022年01月20日 0 点赞 0 评论 739 浏览 评分:9.9
解决密码的思路 摘要:解题思路:注意事项:其他字符是有规定的,不能用else取代参考代码:#include<stdio.h>#include<string.h>int main(){int n,len;if(scanf("…… 题解列表 2022年01月20日 0 点赞 0 评论 351 浏览 评分:9.9
1023: [编程入门]选择排序 摘要:解题思路: 这里使用了冒泡排序,将最大的数放到后面,再逐渐范围比较注意事项:参考代码:public static void main(String[] args) {// …… 题解列表 2022年01月20日 0 点赞 1 评论 269 浏览 评分:6.0
c语言,汽水瓶,递归解题 摘要:解题思路:思路在代码里 注意事项:1、虽然题目要求最多只能输入十组数据,但其实将 for(i=1;i<=10;i++) 改为 while(1) [ps.当while()的括号内的值不为零,该循…… 题解列表 2022年01月20日 0 点赞 0 评论 466 浏览 评分:0.0
幸运数(我看别人的都比较繁琐,直接数下标就行了) 摘要:我也是采用置零的方法,但是不看具体的数,只看下标 ```cpp #include using namespace std; #define max 1000001 int vis[max…… 题解列表 2022年01月20日 0 点赞 2 评论 563 浏览 评分:9.0
看了一定会写这一题的简单写法 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a,b,c,d,e,f,g,h,i; scanf("%d%d%d",&a,&b,&c); …… 题解列表 2022年01月20日 0 点赞 5 评论 664 浏览 评分:8.7
1182: 人民币问题 超简单理解 摘要:```python n=int(input()) count=0 for i in range(1,n+1): for j in range(1,n+1): for …… 题解列表 2022年01月20日 0 点赞 0 评论 459 浏览 评分:0.0