Green1127

C++代码存放设施 site - 01 所有UTF-8已同步

博客园 首页 新随笔 联系 订阅 管理

2023年12月7日 #

摘要: int reverse(int x){ int ans = 0; while (x){ ans *= 10; ans += x % 10; x /= 10; } return ans; } 阅读全文
posted @ 2023-12-07 21:29 Green_wang 阅读(19) 评论(0) 推荐(0)

摘要: 直接封装函数返回string string dec_bin(long long x){ string s = ""; while(x > 0){ int yu = x % 2; s = char(yu + '0') + s; x /= 2; } return s; } 阅读全文
posted @ 2023-12-07 20:12 Green_wang 阅读(18) 评论(0) 推荐(0)