题解:UVA13034 Solve Everything :-)

· · 题解

题解:UVA13034 Solve Everything :-)

题意

判断 13 个整数中有没有 0。

思路

一道水题,模拟即可。

直接写代码

#include<bits/stdc++.h>
#define ONLINE_JUDGE
using namespace std;
int t,Case;

void solve(){
    cout<<"Set #"<<Case<<": ";
    bool ok=true;//打标记
    for(int i=1,x/*省空间好习惯*/;i<=13;i++){
        cin>>x;
        ok&=(x!=0);
    }
    if(ok)cout<<"Yes\n";
    else cout<<"No\n";
}
signed main(){
#ifndef ONLINE_JUDGE
    freopen(".in","r",stdin);
    freopen(".out","w",stdout);
#endif
    for(cin>>t;Case++,t--;solve());
    return 0;
}
/*
文件名: UVa13034.cpp
创建时间: 2025-06-04 15:00:36
作者: __KevinMZ__
*/

没啦