占用内存较少,两个for循环搞定 摘要:解题思路:无注意事项:无参考代码:#include <stdio.h>//素数定义:只能被常数1或自己整除,不能被其他整数整除的正整数int main(){ int int_data = 0; …… 题解列表 2024年05月09日 0 点赞 0 评论 162 浏览 评分:0.0
编写题解 1072: 汽水瓶(可以用递归 解决) 摘要:解题思路:简单递归注意事项:参考代码:#include<iostream>using namespace std;int get_num(int n){ int sum =0; if(n…… 题解列表 2024年05月09日 0 点赞 0 评论 112 浏览 评分:0.0
编写题解 1031: [编程入门]自定义函数之字符串反转 摘要:import java.util.Scanner;public class Main { public static void main(String[] args) { Scan…… 题解列表 2024年05月09日 0 点赞 0 评论 195 浏览 评分:0.0
自定义函数处理最大公约数与最小公倍数 摘要:解题思路:题目要求要建函数,所以得知道怎么去建立函数,再考虑如何去求解,对于小白来说,解题的思路就是建立函数——建立主函数——调用函数注意事项:参考代码:#include<stdio.h>int gb…… 题解列表 2024年05月10日 0 点赞 0 评论 255 浏览 评分:0.0
Python 模拟解决[100分] 摘要:解题思路:模拟法注意事项:参考代码: n = int(input()) nums = list(map(int,input().split())) res = 0 def add_(n…… 题解列表 2024年05月10日 0 点赞 0 评论 307 浏览 评分:0.0
信息学奥赛一本通T1317-组合的输出 摘要:参考代码:#include<bits/stdc++.h>using namespace std;int n,r;int a[25];void dfs(int step,int flag)//step表…… 题解列表 2024年05月10日 1 点赞 0 评论 357 浏览 评分:0.0
无聊的星期六 摘要:解题思路:注意事项:参考代码:#include<stdio.h> int main(){ float x=0; scanf("%f",&x); printf("%.2f",(x < …… 题解列表 2024年05月11日 0 点赞 0 评论 413 浏览 评分:0.0
无聊的星期六 摘要:解题思路:注意事项:参考代码:slen=int(input()) print(sum(int(input()) for i in range(slen))//slen)…… 题解列表 2024年05月11日 0 点赞 0 评论 409 浏览 评分:0.0
明明的随机数(简单解法) 摘要:解题思路:分为三步:第一步:得到数组数据第二步:去除重复的数字,用101表示第三步:把第一组去重后的数据放入第二组第四步:排序第五步:输出数组注意事项:参考代码:#include<iostream>u…… 题解列表 2024年05月11日 0 点赞 0 评论 260 浏览 评分:0.0
自定义函数之字符串连接-简短容易理解 摘要:解题思路:把一个字符串拼接到另一个字符串的末尾注意事项:strcat()函数可在C语言中用于字符串拼接,但如果第一个字符串的空间无法容纳第二个字符串,那么行为未定义,所以str1的长度要足够长。同时s…… 题解列表 2024年05月11日 0 点赞 0 评论 279 浏览 评分:0.0