### 解题思路
####运用位运算(详细请看三级知识点视频)
#### 复杂度
时/空限制:1s / 64MB
难度:简单
来源:CCF
提交次数:6
AC榜(3):刘奕涵,黄易辰,黄煜腾
#### C++ 代码(1)
```
#include
#include
#include
using namespace std;
int main()
{
int n;
cin >> n;
while(n){
cout << "Quotient " << n/2 << ", Remainder " << n%2 << '\n';
n=n/2;
}
return 0;
}
```
#### C++ 代码(2)
```
#include
#include
#include
using namespace std;
int main()
{
int n;
cin >> n;
do{
cout << "Quotient " << n/2 << ", Remainder " << n%2 << '\n';
}while(n=n/2);
return 0;
}
```
####求一个点赞,谢谢!
####2022-01-01 15:18:02 星期六
####黄煜腾