一看就懂,简单易上手 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int n,sum,a; while(cin>>n) …… 题解列表 2022年12月29日 0 点赞 0 评论 603 浏览 评分:0.0
题解 | 3008: 买笔(简单易懂) ##代码```python#方法1x=int(input())pen_4=int(x/4)surplus=x%4if(surplus==3):print('{:d}{:d}{:d}'.format(1,1,pen_4-2))elif(surplus==2):print('{:d}{:d}{:d}'.f 题解列表 2022年12月29日 0 点赞 1 评论 956 浏览 评分:9.9
1707: 数据结构-有向无环图的拓扑排序--邻接表 如果有出现50分情况,或许我能帮助到你 摘要:解题思路:这道题是典型的拓扑排序问题,要用到入度问题的话,那么邻接表是个不错的存储选择注意事项:这道题拓扑排序的算法规规矩矩,但是一定要注意输出顺序参考代码:#include <bits/stdc++…… 题解列表 2022年12月29日 0 点赞 0 评论 828 浏览 评分:9.9
蓝桥杯算法训练VIP-回文数 解题思路:注意事项:参考代码:importjava.nio.channels.ScatteringByteChannel;importjava.util.Scanner;publicclassMain{staticbooleanhuiwen(Strings){//判断回文数char[]c=s.toCh 题解列表 2022年12月29日 0 点赞 0 评论 465 浏览 评分:0.0
超简单题解反置数 解题思路:此题主要是反置函数的设计,在这里输入参数跟输出参数我都是用String类型,先将输入的String转化为一个StringBuff,利用StringBuff自带的函数进行翻转再将其转化为一个String.考虑到可能有前导0的存在,先将转化后的String进行遍历, 题解列表 2022年12月29日 0 点赞 0 评论 552 浏览 评分:0.0
一种超简单的方法 摘要:解题思路:注意事项:参考代码:#includeint main(){ int i,j,k; int n,m=1; scanf("%d",&n); int a[n][n]; for(k=0;k<n;k+…… 题解列表 2022年12月29日 0 点赞 0 评论 477 浏览 评分:9.9
[编程入门]阶乘求和 摘要:解题思路:注意事项:用long long int, printf里头用%lld参考代码:#include <stdio.h>long long func(int n){ int j; long lon…… 题解列表 2022年12月29日 0 点赞 0 评论 338 浏览 评分:0.0
1062: 二级C语言-公约公倍 辗转相除法 摘要:解题思路:数学题,把公式带入。注意事项:参考代码:def gcd(x, y): m = max(x, y) n = min(x, y) while m % n: m, n = …… 题解列表 2022年12月29日 0 点赞 0 评论 607 浏览 评分:9.9
1042: [编程入门]电报加密 简单的凯撒密码 摘要:解题思路:一看就是凯撒密码,循环替换就正确。注意事项:参考代码:x=input()s=""for i in x: if i>="a" and i<="z" or i>="A" and i<="Z"…… 题解列表 2022年12月29日 0 点赞 0 评论 516 浏览 评分:0.0
1016: [编程入门]水仙花数判断 稍稍复杂的循环判断 摘要:解题思路:就是简单循环判断题的加强版,设置范围,然后循环就好了。注意事项:参考代码:for i in range(100,1000): string=str(i) a=string[0] …… 题解列表 2022年12月29日 0 点赞 0 评论 553 浏览 评分:0.0