题解 | #提取不重复的整数#

提取不重复的整数

https://www.nowcoder.com/practice/253986e66d114d378ae8de2e6c4577c1

#include <iostream>
using namespace std;

int main() {
   int number;
   cin>>number;
   int array[10]={};
   int c;
   while(number!=0)
   {
      c=number%10;
      number=number/10;
      if(array[c]==0) 
      {
        cout<<c;
        array[c]=1;
      }
   }
}
// 64 位输出请用 printf("%lld")

全部评论

相关推荐

07-03 16:13
嘉应学院 Python
xiaolihuam...:很明显骗子,如果是hr直接约你面试了,哪用得着内推,如果是员工的话,你得多优秀,一线员工直接加你微信,
点赞 评论 收藏
分享
评论
1
收藏
分享

创作者周榜

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