Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
Re:实在不知道哪里出问题了In Reply To:实在不知道哪里出问题了 Posted by:faononl at 2004-05-14 20:03:21 > for( p = 2 ; p <= 16 && ok == 0 ; p++ ) ~~~~~~~~ p = max + 1 > { > memset( temp , 0 , sizeof(temp)); > for( i = 0 ; i < lena ; i++ ) > { > con = 0 ; > for( j = 0 ; j < lenb ; j++ ) > { > temp[i+j] += (a[i]-'0')*(b[j]-'0') ; > con = temp[i+j] / p ; > temp[i+j] %= p ; > } > temp[i+j] = con ; > } > ok = 1 ; > for( i = 0 ; i < lenc ; i++ ) > { > if ( c[lenc-i-1]-'0' != temp[i] ) > { > ok = 0 ; > break ; > } > } > } > p-- ; > if ( p >= 16 ) p = 0 ; > cout << p << endl ; > } > } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator