Datahub
数据改变生活

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.

样例输入 Copy

1 19

4 4

23 14

0 0

样例输出 Copy

No

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;

}


文章分类: 算法学习
分享到:
QQ:258506508                                     联系电话:020-000000    000-000000                                   联系邮箱:xxx@.co.m                                     联系地址:XXX省XXX市XXX县XXX路