按我说,刷水题一点不好(doge)

13 篇文章 0 订阅
3 篇文章 1 订阅

四道水题赚估值吧!!!

B3648(提交265  通过199)

#include<bits/stdc++.h>
using namespace std;
int x;
int main(){
	cin>>x;
	cout<<"I am "<<x<<" years old.";
	return 0;
}

B3649  (提交453  通过187)

#include<iostream>
using namespace std;
int a,b;
int main(){
	cin>>a>>b;
	if(a<=b){
		cout<<"YE5";//注意是YE5(笑)
	}else{
		cout<<"N0";//注意是N0(哭)
	}
}

B3650(提交465  通过137)

#include<bits/stdc++.h>
using namespace std;
long long int n,i,sum=0;//一定要用long long
int main(){
	scanf("%d",&n);
	for(i=1;i<=n;i++){
		sum+=i;
		printf("%lld\n",sum);
	}
	return 0;
}

B3651(提交220  通过97)

#include<bits/stdc++.h>
using namespace std;
long long int a[1000050],i,k,sum=0,n;
int main(){
	cin>>n>>k;
	for(i=1;i<=n;i++){
		cin>>a[i];
		sum+=a[i];
	}
	sum-=2*a[k];//这个方法估计史无前例吧
	cout<<sum;
	return 0;
}

几个代码帮你们打好了,别浪费时间自己写了

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值