PersonalCorpus 版 (精华区)

1240897 Big Guava ... 128 Accepted
0:00.463 396 2002/11/16 04:35:42.418

void main()
{
#ifndef ONLINE_JUDGE
    freopen("k:\\uva\\i128","r",stdin);
    freopen("k:\\uva\\o128","w",stdout);
#endif

    unsigned int i,j,k,t;
    char s[1030];

    while (1) {
        gets(s); if (s[0]=='#') break;
        t=0; for (i=0;s[i];i++) t=((t<<8)+s[i])%34943;
        t<<=16; t%=34943;
        if (t) t=34943-t;
        printf("%.2X %.2X\n",t>>8,t&0xff);
    }
}
[百宝箱] [返回首页] [上级目录] [根目录] [返回顶部] [刷新] [返回]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:2.050毫秒