1 条题解

  • 0
    @ 2026-8-3 11:30:22

    这道题只需判断整数是否为不为0的数,如果是,输出1。否则输出0。

    #include <bits/stdc++.h>
    using namespace std;
    #define ll long long
    int main()
    {
    	ios::sync_with_stdio(0);
    	cin.tie(0);
    	cout.tie(0);
    	int a;
    	cin>>a;
    	if(a!=0) cout<<1;
    	else cout<<0;
        return 0;
    }
    
    • 1

    信息

    ID
    461
    时间
    1000ms
    内存
    128MiB
    难度
    1
    标签
    递交数
    38
    已通过
    34
    上传者