hdu 2054A == B ?
来源:互联网 发布:fc2免费破解版域名 编辑:程序博客网 时间:2024/06/01 09:29
Problem Description
Give you two numbers A and B, if A is equal to B, you should print "YES", or print "NO".
Input
each test case contains two numbers A and B.
Output
for each case, if A is equal to B, you should print "YES", or print "NO".
Sample Input
1 22 23 34 3
Sample Output
NOYESYESNO
只要把小数点后的零干掉就行了如12.000 12 5.10 5.10000000
#include<iostream>#include<cstring>using namespace std;char a[100000],b[100000];bool is (char *p){for(; *p != '\0' ; p++)if(*p == '.')return true;return false;}void det (char *p){for(; *p != '\0' ; p++);p--;for(; *p == '0' ; p--)*p = '\0';if(*p == '.')*p = '\0';}int main(){while(cin>>a>>b){if(is(a))det(a);if(is(b))det(b);if(strcmp(a,b) == 0)cout<<"YES";else cout<<"NO";cout<<endl;}return 0;}
0 0
- HDU 2054 A == B ?
- HDU 2054 A==B
- hdu acm 2054 A == B ?
- hdu - 2054 - A == B ?
- hdu 2054 A == B ?
- Hdu 2054 - A == B ?
- hdu 2054 A == B ?【JAVA】
- hdu 2054 A==B?
- HDU 2054 A == B ?
- hdu 2054 A==B?
- hdu 2054 A == B ?
- HDU--2054 -- A == B ? [字符串]
- HDU 2054 - A == B ?
- HDU 2054 A == B ?
- HDU-2054 A==B?
- HDU 2054 A==B? 大数
- HDU 2054 A == B ?
- hdu 2054A == B ?
- 如何让自己的Android程序永不被系统kill
- sql server 2012 数据库还原方法
- POJ 2778 DNA Sequence AC自动机+DP+矩阵二分加速
- 仿QQ右下角弹窗新闻_源码分享
- springrain技术详解(1)-shiro基本权限控制
- hdu 2054A == B ?
- Codeforces Round #258 (div2) ABC水题 D规律 E容斥原理
- POJ2253&ZOJ1942--Frogger【SPFA】单源最短路变形
- leetcode 虐我篇之(十)Single Number II
- MySQL的include目录下找不到Lib只有DLL
- Android控件系列之RadioButton&RadioGroup
- LED智能照明与健康-光莆电子-张潇
- 桌面图标弹出提示
- View.setTag(key,object)异常:The key must be an application-specific resource id.