递归算法..................... 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int index=0,circle[100000],m[1000000];void factorial(int a,int j){ …… 题解列表 2024年07月31日 16 点赞 0 评论 2640 浏览 评分:9.7
最短代码解决奇偶数之和 摘要:解题思路:使用求和公式。偶数求和公式为(n / 2) * (n / 2 + 1),奇数求和公式为(n / 2) * (n / 2)或(n / 2) * (n / 2)+n。注意事项:奇数和与偶数和求和…… 题解列表 2024年07月31日 0 点赞 0 评论 171 浏览 评分:9.9
1099: 校门外的树 摘要:解题思路:使用了列表计数器,来对用到的树进行标记注意事项:参考代码:l,m=map(int,input().strip().split())lis = [i for i in range(l+1)]f…… 题解列表 2024年07月31日 0 点赞 0 评论 291 浏览 评分:0.0
2837: 年龄与疾病 摘要:解题思路:注意事项:参考代码:n = int(input())l = list(input().split())a = b = c = d = 0for i in l: if 0 <= int(…… 题解列表 2024年07月31日 0 点赞 0 评论 279 浏览 评分:0.0
2836: 数组逆序重放 摘要:解题思路:注意事项:参考代码:n = int(input())l = list(input().split())l = l[::-1]print(" ".join(l))…… 题解列表 2024年07月31日 0 点赞 0 评论 581 浏览 评分:0.0
2518: 信息学奥赛一本通T1620-质因数分解 摘要:解题思路:注意事项:参考代码:import mathdef is_qurt(n): flag = True for i in range(2,int(math.sqrt(n))+1): …… 题解列表 2024年07月31日 0 点赞 0 评论 431 浏览 评分:9.9
C语言解自守数 摘要:解题思路:由自守数的概念可知,数的平方对数的位数求余即尾数。注意事项:最后的输出没有空格参考代码:#include <stdio.h> #include <math.h> int main() …… 题解列表 2024年07月31日 0 点赞 0 评论 354 浏览 评分:0.0
第n小的质数 摘要:解题思路:注意事项:参考代码:import mathn = int(input())flag = Truet = 0for i in range(2,100000): flag = True …… 题解列表 2024年07月31日 0 点赞 0 评论 250 浏览 评分:0.0
编写题解 1809: [编程基础]输入输出练习之精度控制2 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ double x; cin >> x; printf(…… 题解列表 2024年07月31日 0 点赞 0 评论 184 浏览 评分:0.0
编写题解 1808: [编程基础]输入输出练习之精度控制1 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ double a; cin>>a; pr…… 题解列表 2024年07月31日 0 点赞 0 评论 216 浏览 评分:0.0