C++ || 求一个数中1的位数
摘要:
点击查看代码 #include<iostream> using namespace std; int f(int x) { int count = 0; while(x) { if (x % 10 == 1) { ++count; } x /= 10; } return count; } int m 阅读全文
posted @ 2022-04-17 16:03 有序 阅读(70) 评论(0) 推荐(0) 编辑