关于小码王“魔鬼高强度S人集训营“
2024-07-22 20:33:51
发布于:浙江
虽然只是第一天,但是我觉得马上要见劳大了🤯🤯🤯
尤其是类人猿室友
闹到凌晨3点!!!!!!!!!!!!
无敌了孩子们
---------------------------------------好食的-----------------------------------------
伙食不错,比我们XX小学好1000000000000000000倍
—————————————————学习—————————————————
一天有6个多小时上课,每天一考,压力山大,再也不来了
前提是我得活着出去~~~
接下来就day1的练习题答案了
T1.
#include <iostream>
using namespace std;
int main(){
int a,b,c;
cin >> a >> b >> c;
cout << a0.2 + b0.3 + c*0.5;
return 0;
}
T2.
#include <iostream>
using namespace std;
int main(){
int a[11],n,sum = 0;
for(int i = 1;i<=10;i++){
cin >> a[i];
}
cin >> n;
for(int i = 1;i<=10;i++){
if(a[i]<=n+30){
sum ++;
}
}
cout << sum << endl;
for(int i = 1;i<=10;i++){
if(n + 30 >=a[i]){
cout << a[i] << " ";
}
}
return 0;
}
T3.
#include <iostream>
using namespace std;
int main(){
int a;
char b;
cin >> a>> b;
for(int i = 0;i<=a/2-1;i++){
if(i == 0 or i == a/2-1){
for(int j = 0;j<a;j++){
cout << b;
}
cout << endl;
}else{
cout << b;
for(int i = 1;i<=a-2;i++){cout << " ";}
cout << b;
cout << endl;
}
}
}
T4.
#include <bits/stdc++.h>>
using namespace std;
const int N = 1e5+5;
int a[N];
bool cmp(int x,int y){
if(x%10 != y%10){
return x%10>y%10;
}else{
return x<y;
}
}
int main(){
int n;
cin >> n;
for(int i = 1;i<=n;i++){
cin >> a[i];
}
sort(a+1,a+n+1,cmp);
for(int i =1;i<=n;i++){
cout << a[i] << " " << endl;
}
return 0;
}
T5.
#include <iostream>
using namespace std;
int main(){
for(int i = 0;i<=100;i++){
for(int j = 0;j<=100;j++){
for(int k = 0;k <=100;k++){
if(i + j + k == 100 and k%3 == 0 and i*5 + j *3 + k/3 == 100){
cout << i <<" " << j << " " << k << endl;
}
}
}
}
return 0;
}
T6.
#include <iostream>
using namespace std;
int main(){
int n,m = 0;
cin >> n;
for(int i = 0;i<=n;i++){
for(int j = 0;j<=n;j++){
int k = n - i - j;
if(i + j + k == n and k%3 == 0 and i*5 + j *3 + k/3 == n){
m++;
}
}
}
cout << m;
return 0;
}
T7.
#include <iostream>
using namespace std;
const int N = 1e5 + 5;
int a[N],s[N];
int main(){
int n,q,k,e;
cin >> n;
for(int i = 1;i<=n;i++){
cin >> a[i];
s[i] = s[i-1] + a[i];
}
cin >> q;
for(int i = 1;i<=q;i++){
int k,e;
cin >> k >> e;
cout << s[e] - s[k-1] << endl;
}
return 0;
}
T8.
#include <iostream>
using namespace std;
bool a(int x){
for(int i = 2;i<x;i++){
if(x%i == 0){
return false;
}
}
return true;
}
int main(){
int x,sum = 0;
cin >> x;
for(int i = 2;i<=x;i++){
if(a(i)){
sum++;
}
}
cout << sum;
return 0;
}
ok,后面就不发了(bushi
因为伪少太懒了😎😎
最后祝大家听取WA声一片
不对手滑了,是AC一片🤡🤡🤡🤡🤡🤡🤡🤡
PS:帮忙顶顶吧,为了下一期同学
点个赞也不是不可以
Bye~
全部评论 20
<h1 style="display: inline-block;color:rad;">帮忙顶顶吧孩子们</h1>
2024-07-23 来自 浙江
2<h1 style="display: inline-block;color:rad;">qql</h1>
2024-07-23 来自 浙江
1
<h1 style="display: inline-block;color:rgb(114,51,4);">好</h1> <h2 style="display: inline-block;color:rgb(191,98,10);">的</h2> <h3 style="display: inline-block;color:rgb(114,51,4);">很</h3> <h4 style="display: inline-block;color:rgb(191,98,10);">啊</h4> <h5 style="display: inline-block;color:rgb(114,51,4);">~</h5> <h6 style="display: inline-block;color:rgb(191,98,10);">~</h6>
2024-07-23 来自 浙江
2# 一级标题 ## 二级标题 ### 三级标题 #### 四级标题 ##### 五级标题 ###### 六级标题
2024-07-23 来自 浙江
1//<h1 style="display: inline-block;color:rgb(114,51,4);">好</h1>
//<h2 style="display: inline-block;color:rgb(191,98,10);">的</h2>
//<h3 style="display: inline-block;color:rgb(114,51,4);">很</h3>
//<h4 style="display: inline-block;color:rgb(191,98,10);">啊</h4>
//<h5 style="display: inline-block;color:rgb(114,51,4);">~</h5>
//<h6 style="display: inline-block;color:rgb(191,98,10);">~</h6>2024-07-23 来自 浙江
1有人吗
2024-07-23 来自 浙江
1有人吗
2024-07-22 来自 浙江
16
2024-07-22 来自 浙江
19
2024-07-22 来自 广西
06
2024-07-22 来自 浙江
1哥,点个赞吧
2024-07-22 来自 浙江
1
9个人觉得很屑
2024-07-23 来自 浙江
06
2024-07-24 来自 浙江
0
666
2024-07-23 来自 江苏
0<h1 style="display: inline-block;color:rgb(114,51,4);">h</h1> <h2 style="display: inline-block;color:rgb(191,98,10);">a</h2> <h3 style="display: inline-block;color:rgb(114,51,4);"> </h3> <h4 style="display: inline-block;color:rgb(191,98,10);">h</h4> <h5 style="display: inline-block;color:rgb(114,51,4);">a</h5> <h6 style="display: inline-block;color:rgb(191,98,10);"> </h6> <h7 style="display: inline-block;color:rgb(114,51,4);">h</h1> <h8 style="display: inline-block;color:rgb(191,98,10);">a</h2> <h9 style="display: inline-block;color:rgb(114,51,4);">~</h3>
2024-07-23 来自 浙江
0<h1 style="display: inline-block;color:rgb(114,51,4);">h</h1> <h2 style="display: inline-block;color:rgb(191,98,10);">a</h2> <h3 style="display: inline-block;color:rgb(114,51,4);"> </h3> <h4 style="display: inline-block;color:rgb(191,98,10);">h</h4> <h5 style="display: inline-block;color:rgb(114,51,4);">a</h5> <h6 style="display: inline-block;color:rgb(191,98,10);"> </h6> <h7 style="display: inline-block;color:rgb(114,51,4);">h</h1> <h8 style="display: inline-block;color:rgb(191,98,10);">a</h2> <h9 style="display: inline-block;color:rgb(114,51,4);">~</h3>
2024-07-23 来自 浙江
0我是第11天
2024-07-23 来自 江苏
06
2024-07-23 来自 浙江
0
Markdown的常用语法讲解
刚刚的字体都是从这个大佬的帖子里找的 可以看看
原作者是:CK七星松|再发团队邀请建议趋势2024-07-23 来自 浙江
0以防我忘了
2024-07-23 来自 浙江
0不介意的话我发个字体代码
2024-07-23 来自 浙江
0<center><font color=red size=100>顶顶顶~</font></center>
2024-07-23 来自 浙江
0<center><font color=red size=100>顶顶顶~</font></center>
2024-07-23 来自 浙江
0<center><font color=red size=100>顶顶顶~</font></center>
2024-07-23 来自 浙江
0<center><font color=red size=100>顶顶顶~</font></center>
2024-07-23 来自 浙江
0<h6 style="display: inline-block;color:rgb(114,51,4);">6</h1>
<h6 style="display: inline-block;color:rgb(191,98,10);">的</h2>
<h6 style="display: inline-block;color:rgb(114,51,4);">很</h3>
<h6 style="display: inline-block;color:rgb(191,98,10);">啊</h4>
<h6 style="display: inline-block;color:rgb(114,51,4);">~</h5>
<h6 style="display: inline-block;color:rgb(191,98,10);">~</h6>2024-07-23 来自 浙江
16 的 很 啊 ~ ~
2024-07-23 来自 浙江
1让你学我了吗无奈哥
2024-07-23 来自 浙江
1
6
2024-07-22 来自 浙江
0
有帮助,赞一个