编写题解 1034: [编程入门]自定义函数之数字分离,有比较细节的地方 摘要:解题思路:利用for循环注意事项:直接用input函数不用外面嵌套int,这也是这个题应该注意的地方参考代码:def q():#直接用q带过了 a = input()#直接便利了字符串,而外面有…… 题解列表 2022年11月23日 0 点赞 0 评论 448 浏览 评分:0.0
20221123字符逆序 摘要:解题思路:注意事项:字符串长度为l,则旧/新字符串下标最大均为l-1;参考代码:#include <stdio.h>#include <string.h>int main(){ int i,j…… 题解列表 2022年11月23日 0 点赞 0 评论 245 浏览 评分:0.0
C语言训练-阶乘和数* 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>#include<math.h>using namespace std;int main(){ for(int i=…… 题解列表 2022年11月24日 0 点赞 0 评论 316 浏览 评分:0.0
蓝桥杯算法训练-2的次幂表示-主要记录一下自己花了很长时间的复杂方法 摘要:解题思路:注意事项:参考代码:from math import *# 生成正常的列表def func1(m): list1=[] while 1: a=int(log(m,2…… 题解列表 2022年11月24日 0 点赞 0 评论 284 浏览 评分:0.0
一个采购唯一会的才方法 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){ char ch[100000]; fgets(ch,99999,…… 题解列表 2022年11月24日 0 点赞 0 评论 346 浏览 评分:0.0
20221124The 3n + 1 problem 摘要:解题思路:注意事项:输入&a,&b不确定其大小参考代码:#include <stdio.h>long len(long n){ long c=1; while(n!=1) { if (n%2==0…… 题解列表 2022年11月24日 0 点赞 0 评论 286 浏览 评分:0.0
20221124Minesweeper 摘要:解题思路:创建一个(二维)字符数组与一个(二维)整数数组在字符数组中输入'*'或'.'时进行判断:若'*',则将其符号数组下标对应相同下标的整数数组元素…… 题解列表 2022年11月24日 0 点赞 0 评论 359 浏览 评分:0.0
1173: 计算球体积 摘要:解题思路:注意事项:参考代码:import mathwhile True: try: r = float(input()) pi = math.pi …… 题解列表 2022年11月24日 0 点赞 0 评论 471 浏览 评分:0.0
简单易懂,两个函数给出答案 摘要:解题思路:先用compare函数对比出三个字符串的大小,再用compute函数排出次序。注意事项:1. compare函数返回的是一个数组指针,所以必须将其声明为一个指针函数。参考代码:#includ…… 题解列表 2022年11月24日 0 点赞 0 评论 276 浏览 评分:0.0
无符号数的好处,省去负数讨论 摘要: 要点以下两点 #include int main() { int arr[32] = {0}; unsigned int n, index = 0;// 第一点 sca…… 题解列表 2022年11月24日 0 点赞 0 评论 359 浏览 评分:0.0