12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
YES
00000000000000000002222 2222
YES
200 200000
NO
0.00002 0.000020000000000000000000000000000000
YES
00000000000000000000.00002 0.0000200000
YES
0022000 000000000002200
YES
-0022.00200 -000000000000022.002000000000000000000
YES
0.00 0.000000000000000
YES
000000000 0000000000000
YES
000001.00000 1
YES
-0001.000 0001
YES
-0 0
YES
#include
#include
int main()
{
void d(char *s);
char *pa,*pb,a[100000],b[100000];
while(scanf("%s%s",&a,&b)!=EOF)
{
pa=a;
pb=b;
while(*pa=='0')
{
pa++;
}
while(*pb=='0')
{
pb++;
}
d(pa);
d(pb);
printf(strcmp(pa,pb)?"NO\n":"YES\n");
}
return 0;
}
void d(char *s)
{
int len=strlen(s);
char *p=s+len-1;
if(strchr(s,'.'))//选择出字符串中 字符“ 。 ”
{
while(*p=='0')
{
*p- -=0;
}
}
if(*p=='.')
{
*p=0;
}
}
杭电2054
最新推荐文章于 2022-09-30 15:14:02 发布