| ||||||||||
| 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 | |||||||||
compile error!!!!!!!!!!!!!!!!!!!!In Reply To:这种题有现成的库函数可用的…… Posted by:wpolly at 2007-06-15 06:16:25 > #include<stdio.h>
> #include<stdlib.h>
> #include<string.h>
> char a[9], b[9], c[9], tmp[9];
> int main()
> {
> int n, x, y, z, m;
> scanf("%d", &n);
> while (n--) {
> scanf("%s %s %s", a, b, c);
> m = 1;
> while (++m < 17) {
> x = strtol(a, NULL, m);
> y = strtol(b, NULL, m);
> z = strtol(c, NULL, m);
> if (x * y != z)
> continue;
> if (strcmp(a, itoa(x, tmp, m)))
> continue;
> if (strcmp(b, itoa(y, tmp, m)))
> continue;
> if (strcmp(c, itoa(z, tmp, m)))
> continue;
> break;
> }
> printf("%d\n", m < 17 ? m : 0);
> }
> return 0;
> }
这个程序写的是很好!但是好像交上去就是compile error啊!!!谁能解释一下!!!!
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator