1 条题解

  • 0
    @ 2025-5-28 18:46:37
    #include<iostream>
    using namespace std;
    string d2b(int n){
    	string s = "";while (n > 0){
    		int t = n % 2;n /= 2;
    		s = char(t + '0') + s;
    	}return s;
    }int t;int main() {
    	cin >> t;while (t--) {
    		int n;cin >> n;
    		cout << d2b(n) << endl;
    	}
    }
    

    信息

    ID
    2264
    时间
    1000ms
    内存
    64MiB
    难度
    10
    标签
    递交数
    1
    已通过
    0
    上传者