跳到正文

题解

题解:UVA13034 Solve Everything :-)

HydrogenOxygen约 1 分钟
原文
文章信息与版本

文章信息

收录
2025年12月12日
更新
2026年1月26日
篇幅
约 1 分钟
题目
UVA13034

版本

  1. v1当前

题解:UVA13034 Solve Everything :-)

题意

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

思路

一道水题,模拟即可。

直接写代码

C++
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__
*/
原文