文章

5

粉丝

11

获赞

1

访问

3.6k

头像
反序数 题解:
P1454 清华大学机试题
发布于2023年10月21日 23:54
阅读数 948

//冲击北大的第60天 

#include<iostream>
#include<stdio.h>
#include<string.h>
#include<algorithm>
#include<stack>
using namespace std;
int n,a[1000],b[1000];
int p,q,r,t,l,l1,l2,l3,cnt,tem,ans,sum;
string str,str1,str2;
char x,y;
stack<int>s,s1,s2;

int newfansu(int n){
    int a[4];
    for(int i=0;i<4;i++){
    a[i]=n%10;
    n=n/10;
    }
    int sum=a[0]*1000+a[1]*100+a[2]*10+a[3];
    return sum;
}
int main() {  
    int i=1000;
    while(i<1111){
        int temp=newfansu(i);
        if((i*9)==temp){
            while(temp>0){
            int t=temp%10;
              ...

登录查看完整内容


登录后发布评论

暂无评论,来抢沙发