A == B ?
#include<stdio.h> #include<string.h> char a[100],b[100]; char *change(char *s); void main() { int x; while(~scanf("%s %s",a,b)) { if(strcmp(change(a),change(b))==0) printf("YES\n"); else printf("NO\n"); } } char *change(char *s) { int len=strlen(s); if(strchr(s,'.')!=NULL) { while(s[--len]=='0'); if(s[len]=='.') len--; s[len+1]='\0'; } return s; }
选择了远方,便只顾风雨兼程