题解 | #整型存储#

整型存储

https://www.nowcoder.com/practice/5391e3118a5f419d8198264c5a8c805a

#include <bits/stdc++.h>
using namespace std;
class myClass{
    public:
    string s1[10];
    string s2[10];
    int count=0;
};
int main() {
    int n;
    myClass my;
    while(cin>>n){
        if(n == 0 || my.count == 10)break;
        string s = to_string(n);
        my.s1[my.count] = s;
        reverse(s.begin(),s.end());
        n = stoi(s);
        s = to_string(n);
        my.s2[my.count++] = s;
    }
    for(int i =0;i<my.count;i++)
        cout<<my.s1[i]<<" "<<my.s2[i]<<endl;
}
// 64 位输出请用 printf("%lld")

qd

全部评论

相关推荐

合适才能收到offe...:招聘上写这些态度傲慢的就别继续招呼了,你会发现hr和面试官挺神的,本来求职艰难就可能影响一些心态了,你去这种公司面试的话,整个心态会炸的。
点赞 评论 收藏
分享
owwhy:难,技术栈在嵌入式这块显得非常浅,并且简历有大问题。教育经历浓缩成两行就行了,写什么主修课程,说的不好听这块没人在意,自我评价删了,项目写详细点,最终简历缩成一页。相关技能怎么说呢,有点差了,还写成这么多行
投了多少份简历才上岸
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务