摘要: 字符串读取,字符统计;先按正常的21球,11球,建立两套统计系统,进行处理;11:0或0:11均可,即有可能赢也有可能输;11:9也算一局,所以是有一人达到11球即可。 #include<bits/stdc++.h> using namespace std; int main(){ int w=0, 阅读全文
posted @ 2022-08-13 10:09 zjtofficial 阅读(105) 评论(0) 推荐(0) 编辑
摘要: 每个月津津手里的钱都会增加300,津津手里的钱减去这个月的花销等于剩余的钱,若剩余的钱小于0,说明已经透支。 #include<iostream>#include<cmath>using namespace std;int main(){ int spend,money=0,s=0; for(int 阅读全文
posted @ 2022-08-13 10:05 zjtofficial 阅读(35) 评论(0) 推荐(0) 编辑
摘要: 可以把陶陶的身高加上椅子的高度看做陶陶的总身高,只要果子的高度<=陶陶的身高,就说明他可以摘到苹果。 #include<iostream>using namespace std;int tree[10];int main(){ int t=0; int height; for(int i=0;i<1 阅读全文
posted @ 2022-08-13 10:01 zjtofficial 阅读(31) 评论(0) 推荐(0) 编辑
摘要: 每人的糖果数都用整型定义,分成三份,分别分给相邻的人;输出setw()<iomanip>。 #include<iostream>#include<cstdio>#include<iomanip>using namespace std;int main(){ int a,b,c,d,e; cin>>a 阅读全文
posted @ 2022-08-13 09:58 zjtofficial 阅读(19) 评论(0) 推荐(0) 编辑