-计算一个整数N的阶乘 摘要:解题思路:注意事项:参考代码:n=int(input())sum=1for i in range(1,n+1): sum=sum*iprint(sum) &nbs…… 题解列表 2025年03月11日 0 点赞 0 评论 282 浏览 评分:0.0
这个代码简单些 摘要:解题思路:注意事项:可以输入输出多组数据,列题有误导,所以要加上跳出条件参考代码:while True: try: n=…… 题解列表 2025年03月11日 0 点赞 0 评论 535 浏览 评分:0.0
1049: [编程入门]结构体之时间设计 摘要:```c#include struct Data{ int year; int month; int day;}; int main() { struct…… 题解列表 2025年03月12日 1 点赞 0 评论 639 浏览 评分:0.0
一目了然- 亲和数用while、for 摘要:解题思路:注意事项:参考代码:#include<iostream>usingnamespacestd;intmain(){ int&nb…… 题解列表 2025年03月12日 0 点赞 0 评论 197 浏览 评分:0.0
考虑质数与非质数两种情况即可 摘要:只能切下质数长度的木段,且1和0直接判断先手的人输,不妨直接设置一个数组a[100010]来表示结果,1.输入n,若n为质数,a[n]=1;2.若n不是质数,我们就需要考虑比n小的质数,如果有…… 题解列表 2025年03月12日 3 点赞 0 评论 600 浏览 评分:0.0
1051: [编程入门]结构体之成绩统计2 摘要:```c#include struct student{ char id[100]; char name[100]; int a; int b; int c;}; …… 题解列表 2025年03月12日 0 点赞 0 评论 699 浏览 评分:0.0
刚学STL的小白 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;map<char,int> mp;int a,b = 100…… 题解列表 2025年03月12日 0 点赞 0 评论 340 浏览 评分:0.0
信息学奥赛一本通T1499-最短路计数 堆优化+dijkstra 摘要:解题思路:注意事项:参考代码:#include"bits/stdc++.h"usingnamespacestd;#definell&nb…… 题解列表 2025年03月12日 1 点赞 0 评论 533 浏览 评分:0.0
sort练习---python 摘要:解题思路:注意事项:参考代码:n,m=map(int,input().split())l=list(map(int,input().split())) #要把列表中的数设为Int型,才能适应sort(…… 题解列表 2025年03月12日 0 点赞 0 评论 207 浏览 评分:0.0
c++求后序遍历 摘要:解题思路:先序第一位肯定是根节点,在中序中找到根节点位置后可以推出左边孩子梳理与右边孩子数量,递归后左边孩子变成根再推此根的左边孩子........这就很容易推出中序递归左孩子范围肯定是inorder…… 题解列表 2025年03月13日 0 点赞 0 评论 327 浏览 评分:0.0