2810: 鸡尾酒疗法 摘要:解题思路:比较两种疗法的治愈率。注意事项:唯一的难点就是解决输入输出混合的问题,如果按照常规写法输入输出会混合在一起。这时就需要一个容器来存储每次循环的结果--数组。但是运用数组要明确有效索引,不然会…… 题解列表 2025年11月17日 1 点赞 0 评论 57 浏览 评分:10.0
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 摘要:参考代码:#include<stdio.h>int main(){ int n,a,b,c,d,i; double x,y; scanf("%d",&n); s…… 题解列表 2025年11月09日 0 点赞 0 评论 95 浏览 评分:0.0
2810: 鸡尾酒疗法 摘要:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int n; double x,y,d,d1; cin>>…… 题解列表 2025年10月15日 0 点赞 0 评论 145 浏览 评分:0.0
2025/7/30刷题记录 摘要:解题思路:注意事项:浮点数==浮点数判断会有精度损失所以最后将这个判断放在else中参考代码:#include<stdio.h>#include<math.h>int main…… 题解列表 2025年07月30日 0 点赞 0 评论 149 浏览 评分:0.0
鸡尾酒疗法 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){int n;double x,y,d,d1;cin…… 题解列表 2025年03月23日 1 点赞 0 评论 297 浏览 评分:0.0
int做除法默认floor,如果想还原结果百分比需要*1.0 摘要:解题思路:1.int做除法默认floor,如果想还原结果百分比需要*1.0。如p=1.0*b/a;2.多行数据,如果要用前面一行求固定值,直接输入即可。不用想复杂,又引入数组索引,太麻烦。 cin>>…… 题解列表 2024年12月03日 0 点赞 0 评论 269 浏览 评分:0.0
胡说八道式解释答案, 没有详细介绍 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main ( ){ int n ; int a , b , c, d ; float x ,y ; …… 题解列表 2024年11月05日 2 点赞 0 评论 363 浏览 评分:0.0
2810: 鸡尾酒疗法 摘要:解题思路:注意采取循环注意事项:参考代码:# 鸡尾酒疗法n=int(input())b=[]avg=0now=0for i in range(1,n+1): x,y=(map(int,input…… 题解列表 2024年09月13日 1 点赞 0 评论 410 浏览 评分:9.9
对题2810:利用循环语句输入多组数据,并判断与参考数据的关系 摘要:解题思路:首先需要输入n组数据,其中第一组数据为参考数据,其余n-1组数据均需要与第一组数据进行比较,从而得出是否更加有效。可以采用一个条件语句进行判断,如果n为输入时的n,便将n20/n10的值记录…… 题解列表 2024年09月08日 0 点赞 0 评论 334 浏览 评分:6.0
编写题解 2810: 鸡尾酒疗法 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int n,a,b; cin>>n; float x,y;…… 题解列表 2024年06月04日 0 点赞 0 评论 1421 浏览 评分:0.0