noobcoder

noobcoder
2个月前
#include <iostream>

using namespace std;

int main()
{
int x;
cin >> x;

for (int i = x, j = 0; j < 6; i ++ )
if (i % 2)
{
cout << i << endl;
j ++ ;
}

return 0;
}


noobcoder
2个月前
#include <iostream>
using namespace std;
int main(){
int n;
cin>>n;
for (int i=2;i<10000;i++){
if(i%n==2){
printf("%d\n",i);
}
}
return 0;
}


noobcoder
2个月前
#include <iostream>
using namespace std;
int main(){
int n;
cin>>n;
for (int i=1;i<=n/2;i++){
if(n%i==0)
cout<<i<<endl;

}
cout<<n<<endl;
return 0;
}


noobcoder
2个月前
#include <iostream>
using namespace std;
int main(){
int n,m;
long long  sum =0;
int i=0;
scanf("%d%d",&n,&m);
while (m<=0) scanf("%d",&m);///注意这里用while 不能写成if

for (int j=n;;j++){
sum += j;
i++;
if (i==m) break;
}
printf("%lld",sum);
return 0;

}


noobcoder
2个月前
#include <iostream>
using namespace std;
int main(){
int n;
while (scanf("%d",&n),n){
for(int i=1;i<=n;i++){
printf("%d ",i);
}
printf("\n");
}
return 0;
}


noobcoder
2个月前
#include <iostream>
#include <algorithm>

using namespace std;

int main()
{
int x, y;
cin >> x >> y;

if (x > y) swap(x, y);

int sum = 0;
for (int i=x+1;i<y;i++){
if (i%2){
sum += i;
}
}

cout << sum << endl;

return 0;
}


noobcoder
2个月前
#include <iostream>
#include <algorithm>

using namespace std;

int main()
{
int x, y;
cin >> x >> y;

if (x > y) swap(x, y);

int sum = 0;
for (int i=x+1;i<y;i++){
if (i%2){
sum += i;
}
}

cout << sum << endl;

return 0;
}


noobcoder
2个月前
#include <iostream>
#include <cstdio>
using namespace std;
int main(){
int cnt = 0;
for (int i=0;i<6;i++){
double x;
cin>>x;
if (x>0) cnt++;
}
printf("%d positive numbers",cnt);
return 0;
}


noobcoder
2个月前
#include <iostream>
#include <cstdio>
using namespace std;
int main(){
int n;
scanf("%d",&n);
for (int i=1;i<=n;i+=2){
printf("%d\n",i);

}
return 0;
}


noobcoder
2个月前
#include <iostream>
#include <cstdio>
int main(){
for(int i=2;i<=100;i+=2){
printf("%d\n",i);
}
return 0;
}