编写题解 1046: [编程入门]自定义函数之数字后移(有细致的讲解) 摘要:解题思路:注意事项:参考代码:# index,在列表某一确定位置插入确定的东西(insert() 方法在指定位置插入指定的值。),# pop() 函数用于移除列表中的一个元素(默认最后一个元素),并且…… 题解列表 2022年11月26日 0 点赞 0 评论 421 浏览 评分:0.0
计算矩阵边缘元素之和 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a[500][500]; int i,j,m,n; int sum=0; scanf("%d %d",&…… 题解列表 2022年11月27日 0 点赞 0 评论 362 浏览 评分:0.0
常规解法级数求和 摘要:结果:i = 1835421 Sn = 15.000000参考代码:#include<stdio.h>int main() { int k; double Sn = 0; scanf("%d",&k)…… 题解列表 2022年11月27日 0 点赞 0 评论 381 浏览 评分:0.0
优化求解---第n小的质数 摘要:注意事项:优化求解过程。优化1:第二层for循环中的sqrt(i),因数都是成对出现的。比如,100的因数有:1和100,2和50,4和25,5和20,10和10。看出来没有?成对的因数,其中一个必然…… 题解列表 2022年11月27日 0 点赞 0 评论 462 浏览 评分:0.0
2781: 奇偶ASCII值判断 摘要:解题思路:注意事项:参考代码:while 1: try: a = str(input()) if ord(a) % 2 == 0: print(…… 题解列表 2022年11月27日 0 点赞 0 评论 476 浏览 评分:0.0
2782: 整数大小比较 摘要:while 1: try: while 1: x,y = map(int,input().strip().split()) if (x …… 题解列表 2022年11月27日 0 点赞 0 评论 520 浏览 评分:0.0
一种超简单的方法 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int m,n,i; char str[100]; scanf("%d",&n); ge…… 题解列表 2022年11月27日 0 点赞 0 评论 306 浏览 评分:0.0
温度转换答案C语言 摘要:解题思路:注意事项:注意5/9参考代码:#include<stdio.h>int main(){ float c,n; scanf("%f",&n); c=5.0/9*(n-32); prin…… 题解列表 2022年11月27日 0 点赞 0 评论 340 浏览 评分:0.0
C++递归求解,解决递归超时问题 摘要:解题思路:首先,前四天逐天增加一只母牛,从第五天开始后面出生的母牛也能生小牛了。易知前六天的母牛数量为:1 12 23 34 45 66 9不难看出从第五天开始母牛…… 题解列表 2022年11月28日 0 点赞 0 评论 485 浏览 评分:0.0
C++三目运算符 摘要:解题思路:三目运算符判断大小三目运算符:条件?条件成立:条件不成立注意事项:灵活使用三目运算符会大大提高你的代码效率参考代码:#include <iostream>using namespace st…… 题解列表 2022年11月28日 0 点赞 0 评论 295 浏览 评分:0.0