1129: Which is Greater?发表时间:2022-10-27 19:14 1129: Which is Greater?时间限制: 1 Sec 内存限制: 64 MB 题目描述Given two positive integers, determine whether the first one is larger than the second one. 输入The input file consists of a number of test cases. Each case consists of two positive integers on a single line. The input ends with a line containing two 0’s. 输出Print a list of responses for the input cases, one per line. Print the word Yes if the first number is greater than the second, and No otherwise. 样例输入 Copy1 19 4 4 23 14 0 0 样例输出 CopyNo No Yes #include<bits/stdc++.h> using namespace std; int main(){ int n,m; while(scanf("%d%d",&n,&m)!=EOF){ if(n==0&&m==0) return 0; if(n>m) printf("Yes\n"); else printf("No\n");} return 0; }
文章分类:
算法学习
|