编写题解 1008: [编程入门]成绩评定 摘要:解题思路:注意事项:参考代码:#include<stdio.h> int main() { int num = 0; char ch = 0; scanf("%d", &nu…… 题解列表 2022年07月29日 0 点赞 0 评论 472 浏览 评分:10.0
耍个小聪明 #Python解决平方根问题在python中,math库提供sqrt()函数来完成平方根操作。那还有啥好说的?!```pythonimportmatha=int(input())print("%.3f"%math.sqrt(a))```别说迭代了,循环都没有用上。。。 题解列表 2022年08月08日 1 点赞 0 评论 860 浏览 评分:10.0
1315: 田忌赛马 解题思路:1、先将田忌和齐王最快的马进行比较如果田忌的马更快则先赢一局2、如果田忌最快的马比齐王慢,则比较两者最慢的马,如果田忌的快则派出最慢的马赢下一局。3、如果1、2都不成立,则比较田忌最慢的马和齐王最快的马,并得出输赢结果。注意事项:本题题目没说清楚,本题需要再赢钱的数目为负数的时候输出零。 题解列表 2022年08月12日 0 点赞 0 评论 1073 浏览 评分:10.0
C语言训练-角谷猜想(C语言) 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <math.h>#include <string.h>int main(){ //若为偶数除以2,若为奇数…… 题解列表 2022年08月15日 0 点赞 0 评论 921 浏览 评分:10.0
蓝桥杯2016年第七届真题-路径之谜(DFS) ```cpp#includeusingnamespacestd;constintN=21;inttopCount[N];intleftCount[N];boolvis[N][N]={false};intcurTop[N]={0};intcurLeft[N]={0};boolfound=false;cl 题解列表 2022年08月16日 1 点赞 0 评论 721 浏览 评分:10.0
数组乘常数—2^(n+1)-2 摘要:解题思路:汉罗双塔的次数为2*2(^(n)-1);注意事项:参考代码:#include <stdio.h> #include <malloc.h> #include <string.h> int…… 题解列表 2022年09月13日 0 点赞 0 评论 748 浏览 评分:10.0
优质题解 【C语言】数字游戏:从暴力循环到精简代码 - DotcppXF 摘要:【解题思路】 将题目描述的游戏规则转化为数学规律问题,不断优化代码,解决【时间超限】和【数据超范围】两大难点。【1】常规解法(暴力循环求解) ① 直接按题目描述的规则写代码…… 题解列表 2022年10月04日 4 点赞 5 评论 2165 浏览 评分:10.0
实数的打印 #include#include#includeusingnamespacestd;intmain(){floatn;cin>>n;cout 题解列表 2022年10月12日 2 点赞 0 评论 545 浏览 评分:10.0
递归标准题解 摘要:解题思路:注意事项:参考代码:#include<stdio.h>void f(int i,int x);int s[100]={0}; int s1[100]={0}; //s1[-1]=0; int…… 题解列表 2022年10月19日 0 点赞 0 评论 588 浏览 评分:10.0
[编程入门]矩阵对角线求和,最容易理解的解法,非常暴力 解题思路:注意事项:没有丝毫含金量参考代码:x=list(map(int,input().split()))y=list(map(int,input().split()))z=list(map(int,input().split()))zhu=x[0]+y[1]+z[2]fu=x[2]+y[1]+z[ 题解列表 2022年10月23日 2 点赞 0 评论 1268 浏览 评分:10.0