题解列表

筛选

2999: 牛吃牧草

摘要:解题思路:#设一头牛一天吃n份草#原有s份草#每天增加a份草得方程s+20a=15n*20   s+10a=20n*10解得a/n=(15*20-20*10)/(20-10)=10注意事项:参考代码:……

2784: 收集瓶盖赢大奖

摘要:解题思路:注意事项:||是或者参考代码:#include <iostream>using namespace std;int main(){    int x,y;    cin >> x >>y ;……

成绩排序(python匿名函数解法)

解题思路:思路不难,python创建一个列表存储姓名和成绩,然后再将所有人的成绩存储到一个列表当中,直接用sort函数搭配lambda匿名函数对成绩和名字的字典序进行排序,再用for循环一一输出即可注意事项:lambda函数的用法,sort函数的用法参考代码:n=int(input())sum_gra

2782: 整数大小比较

摘要:解题思路:注意事项:参考代码:#include <iostream>using namespace std;int main(){    int x,y;    cin >> x >>y ;    i……

编写题解 3006: 适合晨练

摘要:解题思路:#include <bits/stdtr1c++.h>using namespace std;int main(){    int t;    cin>>t;    if(25<=t && ……

题解 1783: 星期判断机

摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){    int a;    cin>>a;    switch(a)  ……

3006: 适合晨练

摘要:解题思路:注意事项:25<=t<=30应为(25<=t && t<=30)参考代码:#include <iostream>using namespace std;int main(){    int ……

2781: 奇偶ASCII值判断

摘要:解题思路:注意事项:yes、和no是大写的参考代码:#include <iostream>using namespace std;int main(){    char c;    cin >>c; ……

水陆距离(朴素方法易懂版)

解题思路:这思路是优质题解的思路https://blog.dotcpp.com/a/8945思路如下①:若某陆地上下左右其中有一个是水域,则该陆地到水域的最短距离一定为1②:两个点的距离为x坐标相减的差得绝对值与y坐标相减差的绝对值之和③:把所有水域的坐标保存起来,

1002: [编程入门]三个数最大值

摘要:解题思路:注意事项:这里要比较六次参考代码:#include <iostream>using namespace std;int main(){    int a,b,c;    cin >> a>>……