5 solutions
- 1
Information
- ID
- 32
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 4
- Tags
- # Submissions
- 404
- Accepted
- 177
- Uploaded By
#include <stdio.h>
#include <algorithm>
#include <math.h>
#include <vector>
using namespace std;
int main() {
for(int i=10;i<100;i++)
{
int s=i/10,g=i%10;
printf("%d%d%d\n",i,g,s);
}
return 0;
}
太强了
#include<bits/stdc++.h>
using namespace std;
int main(){
for(int i=1000;i<=9999;i++){
int a,b,c,d;
a=i%10;
b=i/10%10;
c=i/100%10;
d=i/1000%10;
if(a==d&&b==c){
cout<<i<<endl;
}
}
return 0;
}
By signing up a 追梦算法网 universal account, you can submit code and join discussions in all online judging services provided by us.