17 条题解
- 1
信息
- ID
- 829
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 7
- 标签
- 递交数
- 1068
- 已通过
- 279
- 上传者
using namespace std;
int main(){
int b,c=0,d;
cin>>b>>d;
for(b=c+b;b<=d;b++){
if(b%2==1){
c=c+b; }
}
cout<<c;
}
#include<bits/stdc++.h>using namespace std;int main(){int b,c=0,d;cin>>b>>d;for(b=c+b;b<=d;b++){if(b%2==1){c=c+b; }}cout<<c; }```
#include<bits/stdc++.h> using namespace std; int main(){ int b,c=0,d; cin>>b>>d; for(b=c+b;b<=d;b++){ if(b%2==1){ c=c+b; } } cout<<c; }
#include<bits/stdc++.h> using namespace std; int main(){ int b,c=0,d; cin>>b>>d; for(b=c+b;b<=d;b++){ if(b%2==1){ c=c+b; } } cout<<c; }
#include<bits/stdc++.h>
using namespace std;
int main(){
int b,c=0,d;
cin>>b>>d;
for(b=c+b;b<=d;b++){
if(b%2==1){
c=c+b; }
}
cout<<c; }
#include<bits/stdc++.h>
using namespace std;
int main(){
int b,c=0,d;
cin>>b>>d;
for(b=c+b;b<=d;b++){
if(b%2==1){
c=c+b; }
}
cout<<c; }
#include<bits/stdc++.h> using namespace std; int main(){ int m,n,sum=0; cin>>m>>n; while(m<=n){ if(m%2!=0){ sum=sum+m; } m++; } cout<<sum; return 0; }
#include<bits/stdc++.h> using namespace std; int main(){ int m,n,i,sum=0; cin>>m>>n; i=m; while(i<=n){ if(i%2==1) sum+=i; i++; } cout<<sum; return 0; }
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c=0; cin>>a>>b; while(a<=b){ if(a%2==1) c=c+a; a++; } cout<<c; return 0; }
#include<bits/stdc++.h> using namespace std; int main(){ int m,n,sum = 0; cin>>m>>n; for(int i = m;i<=n;i++){ if(i%2==1){ sum +=i; } } cout<<sum; return 0; } 勿抄 不然晚上偷你家马桶盖
segedrtutywqetreqwertyuuiopop;ljgfsasvnm,.. tyftggfgffcvxsedgvvbfg
#include<bits/stdc++.h>
using namespace std;
int main(){
int b,c=0,d;
cin>>b>>d;
for(b=c+b;b<=d;b++){
if(b%2==1){
c=c+b; }
}
cout<<c; }
👍 👍
#include<bits/stdc++.h> using namespace std; int main(){ int b,c=0,d; cin>>b>>d; for(b=c+b;b<=d;b++){ if(b%2!=0){ c=c+b; } } cout<<c; }