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 2 2 2 3 3 4 3
 
Sample Output
NO YES YES NO
 #include <cstdio>
#include <cstring>
char* fun(char *str)
{
if(strchr(str,'.')!=NULL)
{
int i=strlen(str);
while(str[--i]=='');
if(str[i]=='.')
i--;
str[i+]='\0';
}
return str;
}
//不用考虑前导0的情况
int main()
{
char a[],b[];
while(~scanf("%s%s",a,b))
{
if(strcmp(fun(a),fun(b))==)
printf("YES\n");
else
printf("NO\n");
}
return ;
}

HDU_2054——A=B问题的更多相关文章

随机推荐

  1. Android 出现警告Exported service does not require permission

    在配置Android清单文件的时候,配置service,或者activity,或者receive的时候,出现Exported service does not require permission警告 ...

  2. How to configure Gzip for JBoss?---refer

    Question: I think to try to speed up my Web App by reducing the size of transferred data. For exampl ...

  3. udp协议基础(转自疯狂java讲义)

    第17章  网络编程 17.4  基于UDP协议的网络编程 UDP协议是一种不可靠的网络协议,它在通信实例的两端各建立一个Socket,但这两个Socket之间并没有虚拟链路,这两个Socket只是发 ...

  4. Android自定义属性、控件三步法

    第二步中layout-activity_main.xml 中自命名控件: xmlns:android="http://schemas.android.com/apk/res/android& ...

  5. 在linux后台执行脚本

    1. 使用&符号在后台执行命令 你可以在Linux命令或者脚本后面增加&符号,从而使命令或脚本在后台执行,例如:. $ ./my-shell-script.sh & 2. 使用 ...

  6. css02基本选择器

    <!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8&quo ...

  7. JAVA File转Byte[]

    /** * 获得指定文件的byte数组 */ public static byte[] getBytes(String filePath){ byte[] buffer = null; try { F ...

  8. Swift - 39 - 枚举类型关联默认值

    //: Playground - noun: a place where people can play import UIKit enum Month: Int { // 这么定义, 后面的Feb, ...

  9. javascript 广告移动特效

    <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http ...

  10. cos实现文件上传--推荐

    1.导包 2.核心类:MultipartRequest MultipartRequest是request的包装类 参数1:request 参数2:保存路径 参数3:上传文件大小,默认为1M 参数4:编 ...