Hdu上的一道题1058,一直WA呀,为什么#include#define min(a,b) a

发布时间:2021-02-27 06:38:51

Hdu上的一道题1058,一直WA呀,为什么#include#define min(a,b) a

网友回答

while(scanf(%d,&n)&&n)
{ if (n % 10==1&&n%100!=11)
printf(The %dst humble number is %I64d.\n,n,u[n]);
else if
(n % 10==2&&n%100!=12)
printf(The %dnd humble number is %I64d.\n,n,u[n]);
else if
(n % 10==3&&n%100!=13)
printf(The %drd humble number is %I64d.\n,n,u[n]);
else printf(The %dth humble number is %I64d.\n,n,u[n]);
}似乎你输出的时候判断有点问题,这个是我写的,你看看吧.
以上问题属网友观点,不代表本站立场,仅供参考!