当前位置: 代码迷 >> 综合 >> HDU-2051(bitset)
  详细解决方案

HDU-2051(bitset)

热度:11   发布时间:2023-11-23 12:56:59.0
题目链接:https://vjudge.net/problem/HDU-2051
#include <iostream>
#include <cstdio>using namespace std;void DecToBin(int n)
{if(n == 0) return;DecToBin(n/2);printf("%d", n%2);
}
int main()
{int n;while(scanf("%d", &n) != EOF){DecToBin(n);cout << endl;}return 0;
}