diff --git a/15/main.c b/15/main.c new file mode 100644 index 0000000..9844b48 --- /dev/null +++ b/15/main.c @@ -0,0 +1,15 @@ +#include + +int main(void){ + double a = 0.0; + int i, count = 0; + do{ + a = ++count; + for(i = 0;i < 5; i++){ + a = (5.0/4.0 * a) + 1; + } + + }while((a - (int)a) > 10e-6); + printf("%.0lf %d\n",a,count); + return 0; +} diff --git a/15/problem.build b/15/problem.build new file mode 100644 index 0000000..7481c5f Binary files /dev/null and b/15/problem.build differ diff --git a/15/problem.set b/15/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/15/stdin b/15/stdin new file mode 100644 index 0000000..e69de29 diff --git a/15/stdout b/15/stdout new file mode 100644 index 0000000..4444e1d --- /dev/null +++ b/15/stdout @@ -0,0 +1 @@ +3121 1020 diff --git a/17/main.c b/17/main.c new file mode 100644 index 0000000..4535ab5 --- /dev/null +++ b/17/main.c @@ -0,0 +1,6 @@ +#include + +int main(void){ + + return 0; +} diff --git a/17/problem.set b/17/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/17/stdin b/17/stdin new file mode 100644 index 0000000..e69de29 diff --git a/17/stdout b/17/stdout new file mode 100644 index 0000000..e69de29 diff --git a/20/main.c b/20/main.c new file mode 100644 index 0000000..845a8cb --- /dev/null +++ b/20/main.c @@ -0,0 +1,15 @@ +#include + +int main(void){ + int number, i; + scanf("%d",&number); + printf("%d*%d*%d=%lu=",number,number,number,(unsigned long)number*number*number); + int k = number * number - number + 1; + for(i = 0; i < number; i++,k += 2){ + if(i) printf("+"); + printf("%d",k); + } + printf("\n"); + return 0; +} + diff --git a/20/problem.set b/20/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/20/stdin b/20/stdin new file mode 100644 index 0000000..e69de29 diff --git a/20/stdout b/20/stdout new file mode 100644 index 0000000..e69de29 diff --git a/21/main.c b/21/main.c new file mode 100644 index 0000000..310c1de --- /dev/null +++ b/21/main.c @@ -0,0 +1,21 @@ +#include + +int main(void){ + int number,n[20]; + scanf("%d",&number); + int i; + for(i = 0; i < number; i++){ + scanf("%d",&n[i]); + } + int max = -1, now = 1; + for(i = 0; i < number; i++){ + if(n[i] > 0){ + now *= n[i]; + if(now > max) max = now; + } + } + if(max > 0) + printf("%d\n",max); + else printf("-1\n"); + return 0; +} diff --git a/21/problem.build b/21/problem.build new file mode 100644 index 0000000..d57706f Binary files /dev/null and b/21/problem.build differ diff --git a/21/problem.set b/21/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/21/stdin b/21/stdin new file mode 100644 index 0000000..bf31686 --- /dev/null +++ b/21/stdin @@ -0,0 +1,2 @@ +5 +2 5 -1 2 -1 diff --git a/21/stdout b/21/stdout new file mode 100644 index 0000000..209e3ef --- /dev/null +++ b/21/stdout @@ -0,0 +1 @@ +20 diff --git a/22/main.c b/22/main.c new file mode 100644 index 0000000..58df97a --- /dev/null +++ b/22/main.c @@ -0,0 +1,6 @@ +#include + +int main(void){ + printf("192 384 576\n219 438 657\n273 546 819\n327 654 981\n"); + return 0; +} diff --git a/22/problem.build b/22/problem.build new file mode 100644 index 0000000..a8ef52e Binary files /dev/null and b/22/problem.build differ diff --git a/22/problem.set b/22/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/22/stdin b/22/stdin new file mode 100644 index 0000000..e69de29 diff --git a/22/stdout b/22/stdout new file mode 100644 index 0000000..c113117 --- /dev/null +++ b/22/stdout @@ -0,0 +1,4 @@ +192 384 576 +219 438 657 +273 546 819 +327 654 981 diff --git a/23/main.c b/23/main.c new file mode 100644 index 0000000..a64bb63 --- /dev/null +++ b/23/main.c @@ -0,0 +1,27 @@ +#include +int n[30],number; +long long count = 0; +int tdo(int deep); +int main(void){ + scanf("%d",&number); + tdo(1); + printf("%lld\n",count); + return 0; +} + +int tdo(int deep){ + int i,k; + for(i = 1; i <= 2; i++){ + n[deep] = i; + if(deep > 2) + if(n[deep] == 2 && n[deep-1] == 2 && n[deep-2] == 2){ + int max = 1; + for(k = 0; k < number-deep; k++) max *= 2; + count += max; + return 0; + } + if(deep < number) + tdo(deep+1); + } + return 0; +} diff --git a/23/problem.build b/23/problem.build new file mode 100644 index 0000000..392c498 Binary files /dev/null and b/23/problem.build differ diff --git a/23/problem.set b/23/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/23/stdin b/23/stdin new file mode 100644 index 0000000..45a4fb7 --- /dev/null +++ b/23/stdin @@ -0,0 +1 @@ +8 diff --git a/23/stdout b/23/stdout new file mode 100644 index 0000000..e34885b --- /dev/null +++ b/23/stdout @@ -0,0 +1 @@ +107 diff --git a/24.1/main.c b/24.1/main.c new file mode 100644 index 0000000..dd19d77 --- /dev/null +++ b/24.1/main.c @@ -0,0 +1,24 @@ +#include + +int main(void){ + unsigned long long n, c = 0, x, pow = 1, lx = 0; + scanf("%llu",&n); + while(n){ //当n不等于0的时候才继续循环 + x = n % 10; //将n现在的最低位赋值给x + n /= 10; + if(n){//当n不等于0的时候,就是判断现在的处理的位是否到了最后一位 + if(x == 1){ + c += (lx+1) + n * pow; //总数加上现在的位上出现1的次数 + } + else c += (x>0?n+1:n) * pow; //同上 + } + else if(x < 2) + c += lx+1; + else c += pow; + + lx += x * pow;//记录x位后面的位,作为以后x=1的时候的计算依据 + pow *= 10; + } + printf("%llu\n",c); + return 0; +} diff --git a/24.1/problem.build b/24.1/problem.build new file mode 100644 index 0000000..1e471f5 Binary files /dev/null and b/24.1/problem.build differ diff --git a/24.1/problem.set b/24.1/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/24.1/stdin b/24.1/stdin new file mode 100644 index 0000000..aa70b89 --- /dev/null +++ b/24.1/stdin @@ -0,0 +1 @@ +10000000000 diff --git a/24.1/stdout b/24.1/stdout new file mode 100644 index 0000000..3cbc458 --- /dev/null +++ b/24.1/stdout @@ -0,0 +1 @@ +10000000001 diff --git a/24/main.c b/24/main.c new file mode 100644 index 0000000..11e737e --- /dev/null +++ b/24/main.c @@ -0,0 +1,25 @@ +#include +int n[10] = {0}; +unsigned long long count = 0; +int add(int *n); +int main(void){ + unsigned long long i,number; + scanf("%llu",&number); + for(i = 0; i < number; i++) + add(n); + printf("%llu\n",count); + return 0; +} + + +int add(int *n){ + int i = 0; + n[0] += 1; + while(n[i] > 9){ + n[i] %= 10; + n[++i] += 1; + } + for(i = 0; i < 10; i++) + if(n[i] == 1) count++; + return 0; +} diff --git a/24/problem.build b/24/problem.build new file mode 100644 index 0000000..7b4ade9 Binary files /dev/null and b/24/problem.build differ diff --git a/24/problem.set b/24/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/24/stdin b/24/stdin new file mode 100644 index 0000000..a21ef1c --- /dev/null +++ b/24/stdin @@ -0,0 +1 @@ +6342 diff --git a/24/stdout b/24/stdout new file mode 100644 index 0000000..aaf9ab7 --- /dev/null +++ b/24/stdout @@ -0,0 +1 @@ +2975 diff --git a/25/main.c b/25/main.c new file mode 100644 index 0000000..a56e2df --- /dev/null +++ b/25/main.c @@ -0,0 +1,12 @@ +#include + +int main(void){ + unsigned long long n,m,i; + double sum = 0.0; + scanf("%llu %llu",&n,&m); + for(i = n; i <= m; i++){ + sum += 1.0/(i*i); + } + printf("%.5lf\n",sum); + return 0; +} diff --git a/25/problem.build b/25/problem.build new file mode 100644 index 0000000..356fe61 Binary files /dev/null and b/25/problem.build differ diff --git a/25/problem.set b/25/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/25/stdin b/25/stdin new file mode 100644 index 0000000..0efd67f --- /dev/null +++ b/25/stdin @@ -0,0 +1 @@ +2 4 diff --git a/25/stdout b/25/stdout new file mode 100644 index 0000000..7b105ad --- /dev/null +++ b/25/stdout @@ -0,0 +1 @@ +0.42361 diff --git a/26/main.c b/26/main.c new file mode 100644 index 0000000..d63e535 --- /dev/null +++ b/26/main.c @@ -0,0 +1,15 @@ +#include + +int main(void){ + int i,t; + scanf("%d",&t); + unsigned long long t_a,t_b,a = 1, b = 0; + for(i = 0; i < t; i++){ + t_a = 3 * a; + t_b = 2 * b; + a = b; + b = t_a + t_b; + } + printf("%llu %llu\n",a,b); + return 0; +} diff --git a/26/problem.build b/26/problem.build new file mode 100644 index 0000000..ed1c1c6 Binary files /dev/null and b/26/problem.build differ diff --git a/26/problem.set b/26/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/26/stdin b/26/stdin new file mode 100644 index 0000000..1e8b314 --- /dev/null +++ b/26/stdin @@ -0,0 +1 @@ +6 diff --git a/26/stdout b/26/stdout new file mode 100644 index 0000000..9bd976c --- /dev/null +++ b/26/stdout @@ -0,0 +1 @@ +183 546 diff --git a/27/main.c b/27/main.c new file mode 100644 index 0000000..fb873ca --- /dev/null +++ b/27/main.c @@ -0,0 +1,30 @@ +#include +#include + +int main(void){ + unsigned long long bgn = 1671700,i; + int num, count = 0; + scanf("%d",&num); + while(count < num){ + bgn += 100; + int aly = 1; + unsigned long long k, n_bgn = bgn + 99; + for(i = bgn; i <= n_bgn; i++){ + unsigned long long sqri = sqrt(i) + 1; + int kaly = 0; + for(k = 2; k <= sqri; k++){ + if(!(i % k)){ + kaly = 1; + break; + } + } + if(!kaly){ + aly = 0; + break; + } + } + if(aly) count++; + } + printf("%llu %llu\n",bgn,bgn+99); + return 0; +} diff --git a/27/problem.build b/27/problem.build new file mode 100644 index 0000000..bedfec2 Binary files /dev/null and b/27/problem.build differ diff --git a/27/problem.set b/27/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/27/stdin b/27/stdin new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/27/stdin @@ -0,0 +1 @@ +1 diff --git a/27/stdout b/27/stdout new file mode 100644 index 0000000..23c54d7 --- /dev/null +++ b/27/stdout @@ -0,0 +1 @@ +1671800 1671899 diff --git a/28/main.c b/28/main.c new file mode 100644 index 0000000..0a33084 --- /dev/null +++ b/28/main.c @@ -0,0 +1,18 @@ +#include + +int main(void){ + int a,b,i = 0,k = 1; + double sum = 0.0, temp = 1.0; + scanf("%d %d",&a,&b); + while(sum <= a){ + sum += 1.0/temp; + temp += 1.0/++k; + } + printf("%d ",k-1); + while(sum < b){ + sum += 1.0/temp; + temp += 1.0/++k; + } + printf("%d\n",k-2); + return 0; +} diff --git a/28/problem.build b/28/problem.build new file mode 100644 index 0000000..59df6ac Binary files /dev/null and b/28/problem.build differ diff --git a/28/problem.set b/28/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/28/stdin b/28/stdin new file mode 100644 index 0000000..dbc794d --- /dev/null +++ b/28/stdin @@ -0,0 +1 @@ +2010 2011 diff --git a/28/stdout b/28/stdout new file mode 100644 index 0000000..d5f7b49 --- /dev/null +++ b/28/stdout @@ -0,0 +1 @@ +18611 18621 diff --git a/29/main.c b/29/main.c new file mode 100644 index 0000000..a87c858 --- /dev/null +++ b/29/main.c @@ -0,0 +1,28 @@ +#include +int if_has(int i,int m); +int main(void){ + unsigned long long m,n,i,bgn = 1, aft = 9,sum = 0,g = 0; + scanf("%llu %llu",&m,&n); + for(i = 0; i < n-1; i++) bgn *= 10; + for(i = 0; i < n-1;i++){ + aft *= 10; + aft += 9; + } + printf("%llu %llu\n",bgn ,aft); + for(i = bgn; i <= aft; i++){ + if(if_has(i,m) && i%m){ + g++; + sum += i; + } + } + printf("%llu %llu",g,sum); + return 0; +} + +int if_has(int i,int m){ + while(i > 0){ + if(m == i%10) return 1; + i/=10; + } + return 0; +} diff --git a/29/problem.build b/29/problem.build new file mode 100644 index 0000000..a630d93 Binary files /dev/null and b/29/problem.build differ diff --git a/29/problem.build.dSYM/Contents/Info.plist b/29/problem.build.dSYM/Contents/Info.plist new file mode 100644 index 0000000..09786f1 --- /dev/null +++ b/29/problem.build.dSYM/Contents/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleIdentifier + com.apple.xcode.dsym.problem.build + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + dSYM + CFBundleSignature + ???? + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/29/problem.build.dSYM/Contents/Resources/DWARF/problem.build b/29/problem.build.dSYM/Contents/Resources/DWARF/problem.build new file mode 100644 index 0000000..c3613af Binary files /dev/null and b/29/problem.build.dSYM/Contents/Resources/DWARF/problem.build differ diff --git a/29/problem.set b/29/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/29/stdin b/29/stdin new file mode 100644 index 0000000..e5a3ec4 --- /dev/null +++ b/29/stdin @@ -0,0 +1 @@ +7 5 diff --git a/29/stdout b/29/stdout new file mode 100644 index 0000000..388c712 --- /dev/null +++ b/29/stdout @@ -0,0 +1,2 @@ +10000 99999 +32152 1894711910 \ No newline at end of file diff --git a/30/31/main.c b/30/31/main.c new file mode 100644 index 0000000..9d5fab4 --- /dev/null +++ b/30/31/main.c @@ -0,0 +1,19 @@ +#include + +int rmb[6] = {100, 50, 10, 5, 2, 1}; +int main(void){ + int numbers = 0,ac[100]; + scanf("%d",&numbers); + int temp, i, all = 0, count; + for(i = 0; i < numbers; i++) scanf("%d",&ac[i]); + for(i = 0; i < numbers; i++){ + temp = ac[i]; + for(count = 0; count < 6; count++){ + all += temp / rmb[count]; + temp %= rmb[count]; + } + } + printf("%d\n",all); + return 0; +} + diff --git a/30/31/problem.build b/30/31/problem.build new file mode 100644 index 0000000..dba3cf6 Binary files /dev/null and b/30/31/problem.build differ diff --git a/30/31/problem.set b/30/31/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/30/31/stdin b/30/31/stdin new file mode 100644 index 0000000..99e00b5 --- /dev/null +++ b/30/31/stdin @@ -0,0 +1,2 @@ +3 +1 2 3 diff --git a/30/31/stdout b/30/31/stdout new file mode 100644 index 0000000..b8626c4 --- /dev/null +++ b/30/31/stdout @@ -0,0 +1 @@ +4 diff --git a/30/main.c b/30/main.c new file mode 100644 index 0000000..d18bf5c --- /dev/null +++ b/30/main.c @@ -0,0 +1,18 @@ +#include + +int main(void){ + double x; + unsigned long long k,y; + scanf("%llu",&k); + for(y = k; y < 9999999999999; y++){ + x = k*y/(double)(y-k); + if(x < y) break; + if(x - (int)x < 10e-6){ + unsigned long long b,s; + b = x>y?x:y; + s = x + +int main(void){ + int value; + int n,temp,i,k; + scanf("%d %d",&value,&n); + for(i = (n>0)?n:-(n); i > 0; i--){ + if(n < 0){ + temp = value & 2147483648; + value <<= 1; + if(temp == -2147483648) + value += 1; + } + else if(n > 0){ + temp = value & 1; + value >>= 1; + if(temp) + value += 2147483648; + } + } + printf("%d\n",value); + return 0; +} diff --git a/32/problem.build b/32/problem.build new file mode 100644 index 0000000..db21484 Binary files /dev/null and b/32/problem.build differ diff --git a/32/problem.set b/32/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/32/stdin b/32/stdin new file mode 100644 index 0000000..bfa1c58 --- /dev/null +++ b/32/stdin @@ -0,0 +1 @@ +134744064 -8 diff --git a/32/stdout b/32/stdout new file mode 100644 index 0000000..d5ca66c --- /dev/null +++ b/32/stdout @@ -0,0 +1 @@ +134742024 diff --git a/33/main.c b/33/main.c new file mode 100644 index 0000000..752ea74 --- /dev/null +++ b/33/main.c @@ -0,0 +1,14 @@ +#include + +int main(void){ + int a,b,number; + scanf("%d",&number); + int i; + for(i = 0; i< number; i++){ + scanf("%d %d",&a,&b); + a %= 100; + b %= 100; + printf("%d\n",(a+b)%100); + } + return 0; +} diff --git a/33/problem.build b/33/problem.build new file mode 100644 index 0000000..a264753 Binary files /dev/null and b/33/problem.build differ diff --git a/33/problem.set b/33/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/33/stdin b/33/stdin new file mode 100644 index 0000000..43e83aa --- /dev/null +++ b/33/stdin @@ -0,0 +1,3 @@ +2 +35 80 +15 1152 diff --git a/33/stdout b/33/stdout new file mode 100644 index 0000000..392a629 --- /dev/null +++ b/33/stdout @@ -0,0 +1,2 @@ +15 +67 diff --git a/34/main.c b/34/main.c new file mode 100644 index 0000000..66571ff --- /dev/null +++ b/34/main.c @@ -0,0 +1,10 @@ +#include +#include + +int main(void){ + double a, b; + scanf("%lf %lf",&a,&b); + sum = atan(b) - atan(a); + printf("%.6lf",sum); + return 0; +} diff --git a/34/problem.build b/34/problem.build new file mode 100644 index 0000000..b2b1110 Binary files /dev/null and b/34/problem.build differ diff --git a/34/problem.set b/34/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/34/stdin b/34/stdin new file mode 100644 index 0000000..4c189d3 --- /dev/null +++ b/34/stdin @@ -0,0 +1 @@ +0.5 1 diff --git a/34/stdout b/34/stdout new file mode 100644 index 0000000..5dbb835 --- /dev/null +++ b/34/stdout @@ -0,0 +1 @@ +0.321751 \ No newline at end of file diff --git a/35/main.c b/35/main.c new file mode 100644 index 0000000..0dc7efb --- /dev/null +++ b/35/main.c @@ -0,0 +1,19 @@ +#include +#define TH(x) ((x)*(x)) + +int main(void){ + int number,i; + double avg,temp[33000]; + scanf("%d",&number); + for(i = 0 ;i < number; i++){ + scanf("%lf",&temp[i]); + avg += temp[i]; + } + avg /= number; + double s = 0.0; + for(i = 0; i < number; i++){ + s += TH(temp[i] - avg); + } + printf("%.6lf\n",s); + return 0; +} diff --git a/35/problem.build b/35/problem.build new file mode 100644 index 0000000..307a7e4 Binary files /dev/null and b/35/problem.build differ diff --git a/35/problem.set b/35/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/35/stdin b/35/stdin new file mode 100644 index 0000000..1df2e06 --- /dev/null +++ b/35/stdin @@ -0,0 +1,2 @@ +5 +1 2 3 4 5 diff --git a/35/stdout b/35/stdout new file mode 100644 index 0000000..c191924 --- /dev/null +++ b/35/stdout @@ -0,0 +1 @@ +10.000000 diff --git a/36/main.c b/36/main.c new file mode 100644 index 0000000..816ea01 --- /dev/null +++ b/36/main.c @@ -0,0 +1,17 @@ +#include + +int main(void){ + long a, b, i; + scanf("%ld %ld",&a,&b); + long sum = 0; + int if_yes = 0; + for(i = 1; i < a; i++) + if(!(a % i)) sum += i; + if(sum == b) if_yes = 1; + for(i = 1, sum = 0; i < b; i++) + if(!(b % i)) sum += i; + if(sum == a && if_yes) printf("YES\n"); + else printf("NO\n"); + return 0; +} + diff --git a/36/problem.build b/36/problem.build new file mode 100644 index 0000000..be69720 Binary files /dev/null and b/36/problem.build differ diff --git a/36/problem.set b/36/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/36/stdin b/36/stdin new file mode 100644 index 0000000..07efef4 --- /dev/null +++ b/36/stdin @@ -0,0 +1 @@ +220 284 diff --git a/36/stdout b/36/stdout new file mode 100644 index 0000000..f033a50 --- /dev/null +++ b/36/stdout @@ -0,0 +1 @@ +YES diff --git a/37/main.c b/37/main.c new file mode 100644 index 0000000..79e5e6b --- /dev/null +++ b/37/main.c @@ -0,0 +1,15 @@ +#include +int ack(int m, int n); + +int main(void){ + int m,n; + scanf("%d %d",&m,&n); + printf("%d\n",ack(m,n)); + return 0; +} + +int ack(int m, int n){ + if(!n) return ack(m-1,1); + else if(!m) return n+1; + else return ack(m-1,ack(m,n-1)); +} diff --git a/37/problem.build b/37/problem.build new file mode 100644 index 0000000..8163bdf Binary files /dev/null and b/37/problem.build differ diff --git a/37/problem.set b/37/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/37/stdin b/37/stdin new file mode 100644 index 0000000..bce4388 --- /dev/null +++ b/37/stdin @@ -0,0 +1 @@ +3 2 diff --git a/37/stdout b/37/stdout new file mode 100644 index 0000000..f04c001 --- /dev/null +++ b/37/stdout @@ -0,0 +1 @@ +29 diff --git a/38/main.c b/38/main.c new file mode 100644 index 0000000..664b38b --- /dev/null +++ b/38/main.c @@ -0,0 +1,10 @@ +#include + +int main(void){ + double a,b; + scanf("%lf",&a); + printf("%.0lf\n",a*a); + scanf("%lf %lf",&a,&b); + printf("%.0lf\n",a*b); + return 0; +} diff --git a/38/problem.build b/38/problem.build new file mode 100644 index 0000000..276104c Binary files /dev/null and b/38/problem.build differ diff --git a/38/problem.set b/38/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/38/stdin b/38/stdin new file mode 100644 index 0000000..5dcc936 --- /dev/null +++ b/38/stdin @@ -0,0 +1,2 @@ +10 +15 6 diff --git a/38/stdout b/38/stdout new file mode 100644 index 0000000..59d8bd4 --- /dev/null +++ b/38/stdout @@ -0,0 +1,2 @@ +100 +90 diff --git a/39/main.c b/39/main.c new file mode 100644 index 0000000..c44f4c4 --- /dev/null +++ b/39/main.c @@ -0,0 +1,20 @@ +#include +unsigned long long C(int m,int n); + +int main(void){ + int m,n; + scanf("%d %d",&m,&n); + printf("%llu\n",C(m,n)); + return 0; +} + +unsigned long long C(int m,int n){ + int i,c = 1,tmp; + for(i = 0; i < n; i++){ + c *= m-i; + } + for(i = 0; i < n; i++){ + c /= n-i; + } + return c; +} diff --git a/39/problem.build b/39/problem.build new file mode 100644 index 0000000..880de23 Binary files /dev/null and b/39/problem.build differ diff --git a/39/problem.set b/39/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/39/stdin b/39/stdin new file mode 100644 index 0000000..0a39dbc --- /dev/null +++ b/39/stdin @@ -0,0 +1 @@ +9 2 diff --git a/39/stdout b/39/stdout new file mode 100644 index 0000000..7facc89 --- /dev/null +++ b/39/stdout @@ -0,0 +1 @@ +36 diff --git a/40/main.c b/40/main.c new file mode 100644 index 0000000..1d69927 --- /dev/null +++ b/40/main.c @@ -0,0 +1,24 @@ +#include + +int main(void){ + int tmp,i,num[4]; + scanf("%d",&tmp); + i = 0; + while(tmp > 0){ + num[i] = tmp % 10; + tmp /= 10; + i++; + } + tmp = num[3]; + num[3] = num[0]; + num[0] = tmp; + tmp = num[1]; + num[1] = num[2]; + num[2] = tmp; + for(i = 3; i >= 0; i--){ + num[i] = (num[i] + 5)%10; + printf("%d",num[i]); + } + printf("\n"); + return 0; +} diff --git a/40/problem.build b/40/problem.build new file mode 100644 index 0000000..cbe7503 Binary files /dev/null and b/40/problem.build differ diff --git a/40/problem.build.dSYM/Contents/Info.plist b/40/problem.build.dSYM/Contents/Info.plist new file mode 100644 index 0000000..09786f1 --- /dev/null +++ b/40/problem.build.dSYM/Contents/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleIdentifier + com.apple.xcode.dsym.problem.build + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + dSYM + CFBundleSignature + ???? + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/40/problem.build.dSYM/Contents/Resources/DWARF/problem.build b/40/problem.build.dSYM/Contents/Resources/DWARF/problem.build new file mode 100644 index 0000000..ec41c3d Binary files /dev/null and b/40/problem.build.dSYM/Contents/Resources/DWARF/problem.build differ diff --git a/40/problem.set b/40/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/40/stdin b/40/stdin new file mode 100644 index 0000000..1ff838f --- /dev/null +++ b/40/stdin @@ -0,0 +1 @@ +1998 diff --git a/40/stdout b/40/stdout new file mode 100644 index 0000000..6cf44d4 --- /dev/null +++ b/40/stdout @@ -0,0 +1 @@ +3446 diff --git a/41/main.c b/41/main.c new file mode 100644 index 0000000..ce5214a --- /dev/null +++ b/41/main.c @@ -0,0 +1,27 @@ +#include + +int main(void){ + int number, c, tmp = 0, line = 0, count = 0; + scanf("%d",&number); + int all = number * number; + tmp = number; + for(c = 0; c < all; c++){ + int num; + scanf("%d",&num); + if(count == number){ + tmp = number - c/number; + count = 0; + printf("\n"); + } + if(count < number){ + if(tmp > 0){ + if(count) printf(" "); + printf("%d",num); + tmp--; + } + count++; + } + } + printf("\n"); + return 0; +} diff --git a/41/problem.build b/41/problem.build new file mode 100644 index 0000000..1c7bdab Binary files /dev/null and b/41/problem.build differ diff --git a/41/problem.build.dSYM/Contents/Info.plist b/41/problem.build.dSYM/Contents/Info.plist new file mode 100644 index 0000000..09786f1 --- /dev/null +++ b/41/problem.build.dSYM/Contents/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleIdentifier + com.apple.xcode.dsym.problem.build + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + dSYM + CFBundleSignature + ???? + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/41/problem.build.dSYM/Contents/Resources/DWARF/problem.build b/41/problem.build.dSYM/Contents/Resources/DWARF/problem.build new file mode 100644 index 0000000..1038557 Binary files /dev/null and b/41/problem.build.dSYM/Contents/Resources/DWARF/problem.build differ diff --git a/41/problem.set b/41/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/41/stdin b/41/stdin new file mode 100644 index 0000000..00f03e4 --- /dev/null +++ b/41/stdin @@ -0,0 +1,2 @@ +3 +1 2 3 4 5 6 7 8 9 diff --git a/41/stdout b/41/stdout new file mode 100644 index 0000000..6a7a382 --- /dev/null +++ b/41/stdout @@ -0,0 +1,3 @@ +1 2 3 +4 5 +7 diff --git a/42/main.c b/42/main.c new file mode 100644 index 0000000..021618a --- /dev/null +++ b/42/main.c @@ -0,0 +1,16 @@ +#include + +int main(void){ + int m,n; + scanf("%d %d",&m,&n);//m is line. + int i, all = m * n, line,sum = 0,num,asum = 0; + for(i = 0; i < all; i++){ + scanf("%d",&num); + asum += num; + line = i/n; + if(!line || line == m-1) sum += num; + else if(!(i - line*n) || !((i+1) - (line+1)*n)) sum += num; + } + printf("%d\n",asum - (asum - sum)*2); + return 0; +} diff --git a/42/problem.build b/42/problem.build new file mode 100644 index 0000000..455c6a7 Binary files /dev/null and b/42/problem.build differ diff --git a/42/problem.set b/42/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/42/stdin b/42/stdin new file mode 100644 index 0000000..772fdb7 --- /dev/null +++ b/42/stdin @@ -0,0 +1,4 @@ +3 4 +1 1 1 1 +1 2 2 1 +1 1 1 1 diff --git a/42/stdout b/42/stdout new file mode 100644 index 0000000..1e8b314 --- /dev/null +++ b/42/stdout @@ -0,0 +1 @@ +6 diff --git a/43/main.c b/43/main.c new file mode 100644 index 0000000..ac81891 --- /dev/null +++ b/43/main.c @@ -0,0 +1,31 @@ +#include + +int main(void){ + int number,n[105],i,s,m; + scanf("%d",&number); + for(i = 0; i < number; i++){ + scanf("%d",&n[i]); + } + scanf("%d %d",&s,&m); + int if_change = 1; + int tmp; + int end = s+m-1; + while(if_change){ + if_change = 0; + + for(i = s; i < end; i++){ + if(n[i] < n[i+1]){ + tmp = n[i]; + n[i] = n[i+1]; + n[i+1] = tmp; + if_change = 1; + } + } + } + for(i = 0; i < number; i++){ + if(i) printf(" "); + printf("%d",n[i]); + } + printf("\n"); + return 0; +} diff --git a/43/problem.build b/43/problem.build new file mode 100644 index 0000000..aeb5245 Binary files /dev/null and b/43/problem.build differ diff --git a/43/problem.set b/43/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/43/stdin b/43/stdin new file mode 100644 index 0000000..c769e7f --- /dev/null +++ b/43/stdin @@ -0,0 +1,3 @@ +10 +1 2 3 4 5 6 7 8 9 10 +1 8 diff --git a/43/stdout b/43/stdout new file mode 100644 index 0000000..8565942 --- /dev/null +++ b/43/stdout @@ -0,0 +1 @@ +1 9 8 7 6 5 4 3 2 10 diff --git a/44/main.c b/44/main.c new file mode 100644 index 0000000..fcbe553 --- /dev/null +++ b/44/main.c @@ -0,0 +1,30 @@ +#include + +int main(void){ + int number, c, tmp = 0, line = 0, count = 0; + scanf("%d",&number); + int all = number * number; + tmp = 0; + for(c = 0; c < all; c++){ + int num; + scanf("%d",&num); + if(count == number){ + tmp = c/number; + count = 0; + printf("\n"); + } + if(count < number){ + if(count) printf(" "); + if(tmp <= 0){ + printf("%d",num); + } + else{ + printf(" "); + } + tmp--; + count++; + } + } + printf("\n"); + return 0; +} diff --git a/44/problem.build b/44/problem.build new file mode 100644 index 0000000..c83173c Binary files /dev/null and b/44/problem.build differ diff --git a/44/problem.build.dSYM/Contents/Info.plist b/44/problem.build.dSYM/Contents/Info.plist new file mode 100644 index 0000000..09786f1 --- /dev/null +++ b/44/problem.build.dSYM/Contents/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleIdentifier + com.apple.xcode.dsym.problem.build + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + dSYM + CFBundleSignature + ???? + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/44/problem.build.dSYM/Contents/Resources/DWARF/problem.build b/44/problem.build.dSYM/Contents/Resources/DWARF/problem.build new file mode 100644 index 0000000..2f4a173 Binary files /dev/null and b/44/problem.build.dSYM/Contents/Resources/DWARF/problem.build differ diff --git a/44/problem.set b/44/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/44/stdin b/44/stdin new file mode 100644 index 0000000..e3f9c17 --- /dev/null +++ b/44/stdin @@ -0,0 +1,3 @@ +3 +1 2 3 4 5 6 7 8 9 + diff --git a/44/stdout b/44/stdout new file mode 100644 index 0000000..c290ddb --- /dev/null +++ b/44/stdout @@ -0,0 +1,3 @@ +1 2 3 + 5 6 + 9 diff --git a/46/main.c b/46/main.c new file mode 100644 index 0000000..94074ef --- /dev/null +++ b/46/main.c @@ -0,0 +1,18 @@ +#include + +int main(void){ + int n[105], number, i; + scanf("%d",&number); + for(i = 0; i < number; i++) scanf("%d",&n[i]); + int tgt; + scanf("%d",&tgt); + int if_find = -1; + for(i = 0; i < number; i++) + if(n[i] == tgt){ + if_find = i; + break; + } + if(!(~if_find)) printf("null\n"); + else printf("%d\n",if_find); + return 0; +} diff --git a/46/problem.build b/46/problem.build new file mode 100644 index 0000000..52155d2 Binary files /dev/null and b/46/problem.build differ diff --git a/46/problem.set b/46/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/46/stdin b/46/stdin new file mode 100644 index 0000000..ac925da --- /dev/null +++ b/46/stdin @@ -0,0 +1,3 @@ +12 +4 9 13 21 34 89 144 233 377 671 703 812 +34 diff --git a/46/stdout b/46/stdout new file mode 100644 index 0000000..b8626c4 --- /dev/null +++ b/46/stdout @@ -0,0 +1 @@ +4 diff --git a/47/main.c b/47/main.c new file mode 100644 index 0000000..52ac9d7 --- /dev/null +++ b/47/main.c @@ -0,0 +1,17 @@ +#include + +int main(void){ + int number,n[105],i,s,m; + scanf("%d",&number); + for(i = 0; i < number; i++){ + scanf("%d",&n[i]); + } + scanf("%d %d",&s,&m); + double avg = 0.0; + for(i = s; i <= m; i++){ + avg += n[i]; + } + avg /= m-s+1; + printf("%lf\n",avg); + return 0; +} diff --git a/47/problem.build b/47/problem.build new file mode 100644 index 0000000..7c5f608 Binary files /dev/null and b/47/problem.build differ diff --git a/47/problem.set b/47/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/47/stdin b/47/stdin new file mode 100644 index 0000000..c769e7f --- /dev/null +++ b/47/stdin @@ -0,0 +1,3 @@ +10 +1 2 3 4 5 6 7 8 9 10 +1 8 diff --git a/47/stdout b/47/stdout new file mode 100644 index 0000000..8edbf8b --- /dev/null +++ b/47/stdout @@ -0,0 +1 @@ +5.500000 diff --git a/48/main.c b/48/main.c new file mode 100644 index 0000000..b5ef6ec --- /dev/null +++ b/48/main.c @@ -0,0 +1,48 @@ +#include + +int main(void){ + int n,m,c[33000],b[33000]; + scanf("%d %d",&n,&m); + int i; + for(i = 0; i < n; i++) scanf("%d",&c[i]); + for(i = 0; i < m; i++) scanf("%d",&b[i]); + int if_change = 1, tmp; + while(if_change){ + if_change = 0; + for(i = 0 ; i < n-1; i++){ + if(c[i] > c[i+1]){ + tmp = c[i]; + c[i] = c[i+1]; + c[i+1] = tmp; + if_change = 1; + } + } + } + if_change = 1; + while(if_change){ + if_change = 0; + for(i = 0 ; i < m-1; i++){ + if(b[i] > b[i+1]){ + tmp = b[i]; + b[i] = b[i+1]; + b[i+1] = tmp; + if_change = 1; + } + } + } + int count = n,k,sum = 0; + for(i = 0; i < m; i++){ + if(!count) break; + for(k = 0; k < n; k++){ + if(b[i] >= c[k] && count && c[k] != -1){ + sum += b[i]; + c[k] = -1; + count--; + break; + } + } + } + if(count) printf("NULL\n"); + else printf("%d\n",sum); + return 0; +} diff --git a/48/problem.build b/48/problem.build new file mode 100644 index 0000000..a8919b2 Binary files /dev/null and b/48/problem.build differ diff --git a/48/problem.build.dSYM/Contents/Info.plist b/48/problem.build.dSYM/Contents/Info.plist new file mode 100644 index 0000000..09786f1 --- /dev/null +++ b/48/problem.build.dSYM/Contents/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleIdentifier + com.apple.xcode.dsym.problem.build + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + dSYM + CFBundleSignature + ???? + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/48/problem.build.dSYM/Contents/Resources/DWARF/problem.build b/48/problem.build.dSYM/Contents/Resources/DWARF/problem.build new file mode 100644 index 0000000..9338656 Binary files /dev/null and b/48/problem.build.dSYM/Contents/Resources/DWARF/problem.build differ diff --git a/48/problem.set b/48/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/48/stdin b/48/stdin new file mode 100644 index 0000000..feef478 --- /dev/null +++ b/48/stdin @@ -0,0 +1,3 @@ +2 3 +5 4 +7 8 4 diff --git a/48/stdout b/48/stdout new file mode 100644 index 0000000..b4de394 --- /dev/null +++ b/48/stdout @@ -0,0 +1 @@ +11 diff --git a/50/main.c b/50/main.c new file mode 100644 index 0000000..807a644 --- /dev/null +++ b/50/main.c @@ -0,0 +1,14 @@ +#include + +int main(void){ + int number,i,n[33000],tmp; + scanf("%d",&number); + for(i = 0 ;i < number; i++) scanf("%d",&n[i]); + for(i = 0; i < number; i++){ + scanf("%d",&tmp); + if(i) printf(" "); + printf("%d",n[i] + tmp); + } + printf("\n"); + return 0; +} diff --git a/50/problem.build b/50/problem.build new file mode 100644 index 0000000..d48bc16 Binary files /dev/null and b/50/problem.build differ diff --git a/50/problem.set b/50/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/50/stdin b/50/stdin new file mode 100644 index 0000000..8aaebed --- /dev/null +++ b/50/stdin @@ -0,0 +1,3 @@ +5 +1 2 3 4 5 +5 4 3 2 1 diff --git a/50/stdout b/50/stdout new file mode 100644 index 0000000..be6b693 --- /dev/null +++ b/50/stdout @@ -0,0 +1 @@ +6 6 6 6 6 diff --git a/51/main.c b/51/main.c new file mode 100644 index 0000000..21c3c26 --- /dev/null +++ b/51/main.c @@ -0,0 +1,19 @@ +#include +#include + +int main(void){ + char a[8],b[8]; + scanf("%s %s",a,b); + if(!strcmp(a,"A#")) printf("Bb %s\n",b); + else if(!strcmp(a,"C#")) printf("Db %s\n",b); + else if(!strcmp(a,"D#")) printf("Eb %s\n",b); + else if(!strcmp(a,"F#")) printf("Gb %s\n",b); + else if(!strcmp(a,"G#")) printf("Ab %s\n",b); + else if(!strcmp(a,"Bb")) printf("A# %s\n",b); + else if(!strcmp(a,"Db")) printf("C# %s\n",b); + else if(!strcmp(a,"Eb")) printf("D# %s\n",b); + else if(!strcmp(a,"Gb")) printf("F# %s\n",b); + else if(!strcmp(a,"Ab")) printf("G# %s\n",b); + else printf("UNIQUE\n"); + return 0; +} diff --git a/51/problem.build b/51/problem.build new file mode 100644 index 0000000..0cf5447 Binary files /dev/null and b/51/problem.build differ diff --git a/51/problem.set b/51/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/51/stdin b/51/stdin new file mode 100644 index 0000000..10e3b5b --- /dev/null +++ b/51/stdin @@ -0,0 +1 @@ +Ab minor diff --git a/51/stdout b/51/stdout new file mode 100644 index 0000000..8395b0b --- /dev/null +++ b/51/stdout @@ -0,0 +1 @@ +G# minor diff --git a/52/main.c b/52/main.c new file mode 100644 index 0000000..27e0cd1 --- /dev/null +++ b/52/main.c @@ -0,0 +1,18 @@ +#include +#include + +int main(void){ + char string[1024]; + int n, loc; + scanf("%s",string); + scanf("%d %d",&n,&loc); + int i; + for(i = 0; i < n; i++) putchar(string[i]); + printf("\n"); + int len = (int) strlen(string); + for(i = len-n; i <= len-1; i++) putchar(string[i]); + printf("\n"); + for(i = loc; i < loc+n; i++) putchar(string[i]); + printf("\n"); + return 0; +} diff --git a/52/problem.build b/52/problem.build new file mode 100644 index 0000000..63b2acc Binary files /dev/null and b/52/problem.build differ diff --git a/52/problem.set b/52/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/52/stdin b/52/stdin new file mode 100644 index 0000000..9c3ed21 --- /dev/null +++ b/52/stdin @@ -0,0 +1,2 @@ +www.nwpu.edu.cn +5 5 diff --git a/52/stdout b/52/stdout new file mode 100644 index 0000000..b03fa87 --- /dev/null +++ b/52/stdout @@ -0,0 +1,3 @@ +www.n +du.cn +wpu.e diff --git a/53/main.c b/53/main.c new file mode 100644 index 0000000..cde7231 --- /dev/null +++ b/53/main.c @@ -0,0 +1,35 @@ +#include +#include + +int main(void){ + char string[1024], ch; + int num[256], i = 0; + while((ch = getchar()) != '\n'){ + string[i++] = ch; + } + int len = strlen(string); + int if_n = 0, count = -1, if_l = 0; + for(i = 0; i < len; i++){ + if(string[i] > 47 && string[i] < 58) if_n = 1; + else if_n = 0; + if(!if_l && if_n){ + //if(~count) num[count] /= 10; + num[++count] = 0; + num[count] += string[i] - 48; + } + else if(if_l && if_n){ + num[count] *= 10; + num[count] += string[i] - 48; + } + else{ + + } + if_l = if_n; + } + printf("%d\n",++count); + for(i = 0; i < count; i++){ + if(i) printf(" "); + printf("%d",num[i]); + } + return 0; +} diff --git a/53/problem.build b/53/problem.build new file mode 100644 index 0000000..802e60e Binary files /dev/null and b/53/problem.build differ diff --git a/53/problem.set b/53/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/53/stdin b/53/stdin new file mode 100644 index 0000000..b47f25d --- /dev/null +++ b/53/stdin @@ -0,0 +1 @@ +a123X456 7689?89njmk32lnk123 diff --git a/53/stdout b/53/stdout new file mode 100644 index 0000000..cbf100f --- /dev/null +++ b/53/stdout @@ -0,0 +1,3 @@ +a123X456 7689?89njmk32lnk123 +6 +123 456 7689 89 32 123 \ No newline at end of file diff --git a/54/main.c b/54/main.c new file mode 100644 index 0000000..1930d94 --- /dev/null +++ b/54/main.c @@ -0,0 +1,42 @@ +#include +#include + +int sort(char *string, int start, int end, int di); + +int main(void){ + char string[1024]; + scanf("%s",string); + int len = strlen(string), f, s; + if(!(len % 2)) f = len/2 - 1, s = len/2; + else f = len/2 - 1, s = len/2 + 1; + sort(string,0,f,0); + sort(string,s,len-1,1); + int i; + for(i = s; i < len; i++) putchar(string[i]); + if(len%2) putchar(string[f+1]); + for(i = 0; i <= f; i++) putchar(string[i]); + printf("\n"); + return 0; +} + +int sort(char *string, int start, int end, int di){ + int i, if_ch = 1, temp; + while(if_ch){ + if_ch = 0; + for(i = start; i < end; i++) + if(string[i] > string[i+1] && di){ + temp = string[i]; + string[i] = string[i+1]; + string[i+1] = temp; + if_ch = 1; + } + else if(string[i] < string[i+1] && !di){ + temp = string[i]; + string[i] = string[i+1]; + string[i+1] = temp; + if_ch = 1; + } + } + return 0; +} + diff --git a/54/problem.build b/54/problem.build new file mode 100644 index 0000000..35c58f7 Binary files /dev/null and b/54/problem.build differ diff --git a/54/problem.set b/54/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/54/stdin b/54/stdin new file mode 100644 index 0000000..fb23237 --- /dev/null +++ b/54/stdin @@ -0,0 +1 @@ +abcdF9876 diff --git a/54/stdout b/54/stdout new file mode 100644 index 0000000..b282bf0 --- /dev/null +++ b/54/stdout @@ -0,0 +1 @@ +6789Fdcba diff --git a/55/main.c b/55/main.c new file mode 100644 index 0000000..27615c1 --- /dev/null +++ b/55/main.c @@ -0,0 +1,12 @@ +#include +#include + +int main(void){ + char string[1024]; + scanf("%s",string); + int m, i, len = strlen(string); + scanf("%d",&m); + for(i = m; i < len; i++) putchar(string[i]); + printf("\n"); + return 0; +} diff --git a/55/problem.build b/55/problem.build new file mode 100644 index 0000000..483bf4f Binary files /dev/null and b/55/problem.build differ diff --git a/55/problem.set b/55/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/55/stdin b/55/stdin new file mode 100644 index 0000000..4ed310a --- /dev/null +++ b/55/stdin @@ -0,0 +1,2 @@ +112233445566778899 +7 diff --git a/55/stdout b/55/stdout new file mode 100644 index 0000000..057c111 --- /dev/null +++ b/55/stdout @@ -0,0 +1 @@ +45566778899 diff --git a/56/main.c b/56/main.c new file mode 100644 index 0000000..c0fbed5 --- /dev/null +++ b/56/main.c @@ -0,0 +1,28 @@ +#include +#include + +int main(void){ + char (*string[10])[12], (*tmp)[12], buff[10][12]; + int i; + for(i = 0; i < 10; i++){ + string[i] = &buff[i]; + scanf("%s",*string[i]); + } + int if_ch = 1; + while(if_ch){ + if_ch = 0; + for(i = 0; i < 9; i++) + if(strcmp(*string[i], *string[i+1]) > 0){ + tmp = string[i]; + string[i] = string[i+1]; + string[i+1] = tmp; + if_ch = 1; + } + } + for(i = 0; i < 10; i++){ + if(i) printf(" "); + printf("%s",*string[i]); + } + printf("\n"); + return 0; +} diff --git a/56/problem.build b/56/problem.build new file mode 100644 index 0000000..6435623 Binary files /dev/null and b/56/problem.build differ diff --git a/56/problem.build.dSYM/Contents/Info.plist b/56/problem.build.dSYM/Contents/Info.plist new file mode 100644 index 0000000..09786f1 --- /dev/null +++ b/56/problem.build.dSYM/Contents/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleIdentifier + com.apple.xcode.dsym.problem.build + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + dSYM + CFBundleSignature + ???? + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/56/problem.build.dSYM/Contents/Resources/DWARF/problem.build b/56/problem.build.dSYM/Contents/Resources/DWARF/problem.build new file mode 100644 index 0000000..b2061e3 Binary files /dev/null and b/56/problem.build.dSYM/Contents/Resources/DWARF/problem.build differ diff --git a/56/problem.set b/56/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/56/stdin b/56/stdin new file mode 100644 index 0000000..bc6d908 --- /dev/null +++ b/56/stdin @@ -0,0 +1 @@ +she its can ibm bbc NBA nhk BOY jxf eat diff --git a/56/stdout b/56/stdout new file mode 100644 index 0000000..43fa0da --- /dev/null +++ b/56/stdout @@ -0,0 +1 @@ +BOY NBA bbc can eat ibm its jxf nhk she diff --git a/57/main.c b/57/main.c new file mode 100644 index 0000000..5ae7d1c --- /dev/null +++ b/57/main.c @@ -0,0 +1,9 @@ +#include + +int main(void){ + char str1[1024], str2[1024]; + scanf("%s",str1); + scanf("%s",str2); + printf("%s%s\n",str1,str2); + return 0; +} diff --git a/57/problem.build b/57/problem.build new file mode 100644 index 0000000..c0b06dc Binary files /dev/null and b/57/problem.build differ diff --git a/57/problem.set b/57/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/57/stdin b/57/stdin new file mode 100644 index 0000000..94954ab --- /dev/null +++ b/57/stdin @@ -0,0 +1,2 @@ +hello +world diff --git a/57/stdout b/57/stdout new file mode 100644 index 0000000..31e0fce --- /dev/null +++ b/57/stdout @@ -0,0 +1 @@ +helloworld diff --git a/58/main.c b/58/main.c new file mode 100644 index 0000000..1c599a9 --- /dev/null +++ b/58/main.c @@ -0,0 +1,12 @@ +#include + +int main(void){ + char string[1024], ch[2]; + int i,count = 0; + while((ch[0] = getchar()) != '\n') string[count++] = ch[0]; + scanf("%s",ch); + for(i = 0; i < count; i++) + if(string[i] != ch[0]) putchar(string[i]); + printf("\n"); + return 0; +} diff --git a/58/problem.build b/58/problem.build new file mode 100644 index 0000000..576d215 Binary files /dev/null and b/58/problem.build differ diff --git a/58/problem.set b/58/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/58/stdin b/58/stdin new file mode 100644 index 0000000..01bdf28 --- /dev/null +++ b/58/stdin @@ -0,0 +1,2 @@ +djweifjweifjqwjijvqiowa2edw +w diff --git a/58/stdout b/58/stdout new file mode 100644 index 0000000..ab4699c --- /dev/null +++ b/58/stdout @@ -0,0 +1 @@ +djeifjeifjqjijvqioa2ed diff --git a/59/main.c b/59/main.c new file mode 100644 index 0000000..91ee2be --- /dev/null +++ b/59/main.c @@ -0,0 +1,15 @@ +#include +#include + +int main(void){ + char str1[1024], str2[1024]; + gets(str1); + gets(str2); + int lena = strlen(str1), lenb = strlen(str2); + int i; + long long a = 0, b = 0; + for(i = 0; i < lena; i++) a += str1[i]; + for(i = 0; i< lenb; i++) b += str2[i]; + printf("%lld",a-b); + return 0; +} diff --git a/59/problem.build b/59/problem.build new file mode 100644 index 0000000..a61a9af Binary files /dev/null and b/59/problem.build differ diff --git a/59/problem.set b/59/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/59/stdin b/59/stdin new file mode 100644 index 0000000..cdda925 --- /dev/null +++ b/59/stdin @@ -0,0 +1,2 @@ +Aid +And diff --git a/59/stdout b/59/stdout new file mode 100644 index 0000000..c67f81a --- /dev/null +++ b/59/stdout @@ -0,0 +1 @@ +-5 \ No newline at end of file diff --git a/60/main.c b/60/main.c new file mode 100644 index 0000000..39f9dc1 --- /dev/null +++ b/60/main.c @@ -0,0 +1,27 @@ +#include +#include + +int main(void){ + char string[1024], word[512][16]; + gets(string); + printf("%s\n",string); + int i, len = strlen(string); + int if_l = 0, if_n = 0, count = -1, k = 0; + for(i = 0; i < len; i++){ + if((string[i] >= 'a' && string[i] <= 'z') || (string[i] >= 'A' && string[i] <= 'Z')) + if_n = 1; + else if_n = 0; + if(if_n && !if_l){ + k = 0; + word[++count][k++] = string[i]; + } + else if(if_n && if_l) word[count][k++] = string[i]; + else if(!if_n && if_l) if(~count) word[count][k] = '\0'; + if_l = if_n; + } + for(i = count; ~i; i--){ + printf("%s",word[i]); + } + printf("\n"); + return 0; +} diff --git a/60/problem.build b/60/problem.build new file mode 100644 index 0000000..fed27c4 Binary files /dev/null and b/60/problem.build differ diff --git a/60/problem.set b/60/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/60/stdin b/60/stdin new file mode 100644 index 0000000..363ae9e --- /dev/null +++ b/60/stdin @@ -0,0 +1 @@ +I am a student. I like study. diff --git a/60/stdout b/60/stdout new file mode 100644 index 0000000..5bbaabd --- /dev/null +++ b/60/stdout @@ -0,0 +1,2 @@ +I am a student. I like study. + I like studyI am a student diff --git a/61/main.c b/61/main.c new file mode 100644 index 0000000..285ddde --- /dev/null +++ b/61/main.c @@ -0,0 +1,12 @@ +#include +#include + +int main(void){ + char string[1024]; + gets(string); + int len = strlen(string), i; + for(i = 0; i < len; i++) + if(string[i] % 2 && i % 2) putchar(string[i]); + printf("\n"); + return 0; +} diff --git a/61/problem.build b/61/problem.build new file mode 100644 index 0000000..ae1cbfe Binary files /dev/null and b/61/problem.build differ diff --git a/61/problem.set b/61/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/61/stdin b/61/stdin new file mode 100644 index 0000000..11f11f9 --- /dev/null +++ b/61/stdin @@ -0,0 +1 @@ +0123456789 diff --git a/61/stdout b/61/stdout new file mode 100644 index 0000000..5dc07a9 --- /dev/null +++ b/61/stdout @@ -0,0 +1 @@ +13579 diff --git a/62/DATA5613.CPP b/62/DATA5613.CPP new file mode 100644 index 0000000..1f06941 --- /dev/null +++ b/62/DATA5613.CPP @@ -0,0 +1,3 @@ +my frind why won't +ill always hold +my lfve look up in the sky diff --git a/62/DATA5613.TXT b/62/DATA5613.TXT new file mode 100644 index 0000000..3a03953 --- /dev/null +++ b/62/DATA5613.TXT @@ -0,0 +1,3 @@ +my frwnd why won't +ill always hold +my love look up in the sky diff --git a/62/main.c b/62/main.c new file mode 100644 index 0000000..db8c07e --- /dev/null +++ b/62/main.c @@ -0,0 +1,18 @@ +#include +#include + +int main(void){ + char str1[1024], str2[1024]; + FILE *fpa = fopen("DATA5613.TXT","r"), *fpb = fopen("DATA5613.CPP","r"); + int count = 1; + while(fgets(str1,1024,fpa) != NULL && fgets(str2,1024,fpb) != NULL){ + int i, len = strlen(str1); + for(i = 0; i < len; i++){ + if(str1[i] != str2[i]) printf("%d %d\n",count,i+1); + } + count++; + } + fclose(fpa); + fclose(fpb); + return 0; +} diff --git a/62/problem.build b/62/problem.build new file mode 100644 index 0000000..10fd05c Binary files /dev/null and b/62/problem.build differ diff --git a/62/problem.set b/62/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/62/stdin b/62/stdin new file mode 100644 index 0000000..e69de29 diff --git a/62/stdout b/62/stdout new file mode 100644 index 0000000..65eb3a0 --- /dev/null +++ b/62/stdout @@ -0,0 +1,2 @@ +1 6 +3 5 diff --git a/63/main.c b/63/main.c new file mode 100644 index 0000000..1e40a3b --- /dev/null +++ b/63/main.c @@ -0,0 +1,25 @@ +#include +#include + +int main(void){ + char string[1024], ch[2]; + gets(string); + scanf("%s",ch); + int len = strlen(string), if_l = 0, if_n = 0; + int count, max = 0; + int i; + for(i = 0; i < len; i++){ + if(string[i] == ch[0]) if_n = 1; + else if_n = 0; + if(!if_l && !if_n){ + count = 1; + } + if(if_n && if_l) count++; + if(if_n && !if_l) count = 1; + if(count > max) max = count; + if_l = if_n; + } + for(i = 0; i < max; i++) printf("%c",ch[0]); + printf("\n"); + return 0; +} diff --git a/63/problem.build b/63/problem.build new file mode 100644 index 0000000..f63207e Binary files /dev/null and b/63/problem.build differ diff --git a/63/problem.set b/63/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/63/stdin b/63/stdin new file mode 100644 index 0000000..d0fbd4d --- /dev/null +++ b/63/stdin @@ -0,0 +1,2 @@ +aaabbbcccdddeeeeefffffeeee +e diff --git a/63/stdout b/63/stdout new file mode 100644 index 0000000..3befbed --- /dev/null +++ b/63/stdout @@ -0,0 +1 @@ +eeeee diff --git a/64/main.c b/64/main.c new file mode 100644 index 0000000..4039b19 --- /dev/null +++ b/64/main.c @@ -0,0 +1,15 @@ +#include +#include + +int main(void){ + char string[1024]; + gets(string); + int len = strlen(string), i; + for(i = 0; i < len; i++){ + if(string[i] >= 'a' && string[i] <= 'z') printf("%c",string[i]-3); + else if(string[i] >= 'A' && string[i] <= 'Z') printf("%c",string[i]+3); + else printf("%c",string[i]); + } + printf("\n"); + return 0; +} diff --git a/64/problem.build b/64/problem.build new file mode 100644 index 0000000..b1397cd Binary files /dev/null and b/64/problem.build differ diff --git a/64/problem.set b/64/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/64/stdin b/64/stdin new file mode 100644 index 0000000..855590a --- /dev/null +++ b/64/stdin @@ -0,0 +1 @@ +ABCDEF diff --git a/64/stdout b/64/stdout new file mode 100644 index 0000000..08d8268 --- /dev/null +++ b/64/stdout @@ -0,0 +1 @@ +DEFGHI diff --git a/65/DATA5611.bmp b/65/DATA5611.bmp new file mode 100644 index 0000000..c56aa1a Binary files /dev/null and b/65/DATA5611.bmp differ diff --git a/65/main.c b/65/main.c new file mode 100644 index 0000000..33e3192 --- /dev/null +++ b/65/main.c @@ -0,0 +1,58 @@ +#include +#include +typedef unsigned short int WORD; +typedef unsigned int DWORD; +typedef unsigned char BYTE; + +typedef struct tagBITMAPFILEHEADER +{ + WORD bfType; // 位图文件的类型,必须为BM(0-1字节) + DWORD bfSize; // 位图文件的大小,以字节为单位(2-5字节) + WORD bfReserved1; // 位图文件保留字,必须为0(6-7字节) + WORD bfReserved2; // 位图文件保留字,必须为0(8-9字节) + DWORD bfOffBits; // 位图数据的起始位置(10-13字节),以相对于 +} BITMAPFILEHEADER; + + +typedef struct tagBITMAPINFOHEADER +{ + DWORD biSize; // 本结构所占用字节数(14-17字节) + DWORD biWidth; // 位图的宽度,以像素为单位(18-21字节) + DWORD biHeight; // 位图的高度,以像素为单位(22-25字节) + WORD biPlanes; // 目标设备的级别,必须为1(26-27字节) + WORD biBitCount; // 每个像素所需的位数,必须是1(双色),(28-29字节) + DWORD biCompression; // 位图压缩类型,必须是 0(不压缩),(30-33字节) + DWORD biSizeImage; // 位图的大小,以字节为单位(34-37字节) + DWORD biXPelsPerMeter; // 位图水平分辨率,每米像素数(38-41字节) + DWORD biYPelsPerMeter; // 位图垂直分辨率,每米像素数(42-45字节) + DWORD biClrUsed; // 位图实际使用的颜色表中的颜色数(46-49字节) 设为0的话,则说明使用所有调色板项,即2 biBitCount种颜色 + DWORD biClrImportant; // 位图显示过程中重要的颜色数(50-53字节) +}BITMAPINFOHEADER; + +typedef struct tagRGBQUAD +{ + BYTE rgbBlue; // 蓝色的亮度(值范围为0-255) + BYTE rgbGreen; // 绿色的亮度(值范围为0-255) + BYTE rgbRed; // 红色的亮度(值范围为0-255) + BYTE rgbReserved; // 保留字,必须为0 +} RGBQUAD; + +int main(void) +{ + FILE *result_r;// 输出的三个通道文件 + FILE *result_g; + FILE *result_b; + FILE *bmp;// 要读入的BMP文件 + long real_w;// 一个扫描行的实际占用字节数 + long offset = 0;// 用于偏移每行结尾处的冗余数据 + + BITMAPFILEHEADER header;// BMP文件头 + BITMAPINFOHEADER info;// BMP信息头 + + bmp=fopen("DATA5611.BMP", "r"); + + fread(&header,14,1,bmp); + fread(&info,40,1,bmp); + printf("%d %d\n",info.biWidth,info.biHeight); + return 0; +} diff --git a/65/problem.build b/65/problem.build new file mode 100644 index 0000000..489860c Binary files /dev/null and b/65/problem.build differ diff --git a/65/problem.set b/65/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/65/stdin b/65/stdin new file mode 100644 index 0000000..e69de29 diff --git a/65/stdout b/65/stdout new file mode 100644 index 0000000..50f9cec --- /dev/null +++ b/65/stdout @@ -0,0 +1 @@ +480 480 diff --git a/66/main.c b/66/main.c new file mode 100644 index 0000000..5e2d8b2 --- /dev/null +++ b/66/main.c @@ -0,0 +1,18 @@ +#include + +int main(void){ + int a,b,c,d; + int sa,sb; + char ad; + scanf("%d/%d%c%d/%d",&b,&a,&ad,&d,&c); + if(ad == '+') sa = b*c + a*d; + else sa = b*c - a*d; + sb = a*c; + int i, min = sa>sb?sb:sa; + int ys = 0; + for(i = 1; i <= min; i++){ + if(!(sb % i) && !(sa % i) && ys < i) ys = i; + } + printf("%d/%d\n",sa/ys,sb/ys); + return 0; +} diff --git a/66/problem.build b/66/problem.build new file mode 100644 index 0000000..cafd4ae Binary files /dev/null and b/66/problem.build differ diff --git a/66/problem.set b/66/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/66/stdin b/66/stdin new file mode 100644 index 0000000..de3db3d --- /dev/null +++ b/66/stdin @@ -0,0 +1 @@ +1/8+3/8 diff --git a/66/stdout b/66/stdout new file mode 100644 index 0000000..fa457ba --- /dev/null +++ b/66/stdout @@ -0,0 +1 @@ +1/2 diff --git a/67/main.c b/67/main.c new file mode 100644 index 0000000..3ecc95c --- /dev/null +++ b/67/main.c @@ -0,0 +1,14 @@ +#include + +int main(void){ + int output[10] = {0},count = 0; + int input; + scanf("%d",&input); + while(input > 0){ + output[count++] = input % 2; + input /= 2; + } + for(input = count-1; input >=0; input--) printf("%d",output[input]); + printf("\n"); + return 0; +} diff --git a/67/problem.build b/67/problem.build new file mode 100644 index 0000000..6363934 Binary files /dev/null and b/67/problem.build differ diff --git a/67/problem.set b/67/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/67/stdin b/67/stdin new file mode 100644 index 0000000..00750ed --- /dev/null +++ b/67/stdin @@ -0,0 +1 @@ +3 diff --git a/67/stdout b/67/stdout new file mode 100644 index 0000000..b4de394 --- /dev/null +++ b/67/stdout @@ -0,0 +1 @@ +11 diff --git a/68/DATA5612.CPP b/68/DATA5612.CPP new file mode 100644 index 0000000..9728b87 --- /dev/null +++ b/68/DATA5612.CPP @@ -0,0 +1,5 @@ +dwfwonwqpvnqev +1`432r2324wqqerg +`3r`fh2ofih2oif223r23r22 +r214t124t2fj214klkrgj +143gjelmeffn3fjvon3rf diff --git a/68/DATA5612.TXT b/68/DATA5612.TXT new file mode 100644 index 0000000..0dc72fc --- /dev/null +++ b/68/DATA5612.TXT @@ -0,0 +1,10 @@ +0001 dwfwonwqpvnqev + +0002 1`432r2324wqqerg + +0003 `3r`fh2ofih2oif223r23r22 + +0004 r214t124t2fj214klkrgj + +0005 143gjelmeffn3fjvon3rf + diff --git a/68/main.c b/68/main.c new file mode 100644 index 0000000..6290103 --- /dev/null +++ b/68/main.c @@ -0,0 +1,13 @@ +#include + +int main(void){ + FILE *fpr = fopen("DATA5612.CPP","r"); + FILE *fpw = fopen("DATA5612.TXT","w"); + char string[1024], count = 1; + while(fgets(string,1024,fpr) != NULL){ + fprintf(fpw,"%04d %s",count++,string); + } + fclose(fpr); + fclose(fpw); + return 0; +} diff --git a/68/problem.build b/68/problem.build new file mode 100644 index 0000000..37221f8 Binary files /dev/null and b/68/problem.build differ diff --git a/68/problem.set b/68/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/68/stdin b/68/stdin new file mode 100644 index 0000000..909a489 --- /dev/null +++ b/68/stdin @@ -0,0 +1,5 @@ +qwidjeoiheoif +21e2r23wdw +4`14ef2ef324 +fe3f243gferg23okf2f +frewvew diff --git a/68/stdout b/68/stdout new file mode 100644 index 0000000..e69de29 diff --git a/69/DATA5614.DB b/69/DATA5614.DB new file mode 100644 index 0000000..0c6040d --- /dev/null +++ b/69/DATA5614.DB @@ -0,0 +1,2 @@ +2 +101 zhang 78 106 wang 88 diff --git a/69/main.c b/69/main.c new file mode 100644 index 0000000..9e8d8bc --- /dev/null +++ b/69/main.c @@ -0,0 +1,21 @@ +#include +#include + +int main(void){ + int number, i; + int m_sid, m_score = -1; + char m_name[12]; + int sid, score; + char name[12]; + scanf("%d",&number); + for(i = 0; i < number; i++){ + scanf("%d %s %d",&sid,name,&score); + if(score > m_score){ + m_sid = sid; + m_score = score; + strcpy(m_name,name); + } + } + printf("%d %s %d\n",m_sid,m_name,m_score); + return 0; +} diff --git a/69/problem.build b/69/problem.build new file mode 100644 index 0000000..3b0748f Binary files /dev/null and b/69/problem.build differ diff --git a/69/problem.set b/69/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/69/stdin b/69/stdin new file mode 100644 index 0000000..0c6040d --- /dev/null +++ b/69/stdin @@ -0,0 +1,2 @@ +2 +101 zhang 78 106 wang 88 diff --git a/69/stdout b/69/stdout new file mode 100644 index 0000000..1695d63 --- /dev/null +++ b/69/stdout @@ -0,0 +1 @@ +106 wang 88 diff --git a/70/DATA5609.DAT b/70/DATA5609.DAT new file mode 100644 index 0000000..8715556 Binary files /dev/null and b/70/DATA5609.DAT differ diff --git a/70/main.c b/70/main.c new file mode 100644 index 0000000..37a6632 --- /dev/null +++ b/70/main.c @@ -0,0 +1,23 @@ +#include +#include + +int main(void){ + FILE *fp = fopen("DATA5609.DAT","rb"); + char jpeg[12], gif[12], png[12]; + fseek(fp, 6, SEEK_SET); + fread(jpeg,4,1,fp); + jpeg[4] = '\0'; + + fseek(fp, 0, SEEK_SET); + fread(gif,6,1,fp); + gif[6] = '\0'; + + fseek(fp, 1, SEEK_SET); + fread(png,3,1,fp); + png[3] = '\0'; + + if(!strcmp(jpeg,"JFIF")) printf("JPEG\n"); + else if(!strcmp(gif,"GIF89a")) printf("GIF\n"); + else if(!strcmp(png,"PNG")) printf("PNG\n"); + return 0; +} diff --git a/70/problem.build b/70/problem.build new file mode 100644 index 0000000..1335cc2 Binary files /dev/null and b/70/problem.build differ diff --git a/70/problem.set b/70/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/70/stdin b/70/stdin new file mode 100644 index 0000000..e69de29 diff --git a/70/stdout b/70/stdout new file mode 100644 index 0000000..8044c20 --- /dev/null +++ b/70/stdout @@ -0,0 +1 @@ +GIF diff --git a/71/main.c b/71/main.c new file mode 100644 index 0000000..1e130e9 --- /dev/null +++ b/71/main.c @@ -0,0 +1,37 @@ +#include +#include + +int main(void){ + int lena, lenb, i, k, count, bit = 0 ,zf = 1, aadd = 0, badd = 0; + char a[128],b[128]; + short tmpc[1024]; + scanf("%s",a); + scanf("%s",b); + if(a[0] == '-') zf *= -1, aadd++; + if(b[0] == '-') zf *= -1, badd++; + lena = strlen(a); + for(i = aadd; i < lena; i++) a[i] -= 48; + lenb = strlen(b); + for(i = badd; i < lenb; i++) b[i] -= 48; + for(i = 0; i < 1024; i++) tmpc[i] = 0; + for(i = lenb-1; i >= badd; i--){ + count = 0; + for(k = lena-1; k >= aadd; k--){ + tmpc[bit+count++] += a[k] * b[i]; + } + count = 0; + for(k = bit; k < 1024; k++){ + tmpc[k+1] += tmpc[k] / 10; + tmpc[k] %= 10; + } + bit++; + } + int if_zero = 1; + if(!~zf) printf("-"); + for(i = 1023; ~i; i--){ + if(tmpc[i] != 0 && if_zero) if_zero = 0; + if(!if_zero) printf("%d",tmpc[i]); + } + printf("\n"); + return 0; +} diff --git a/71/problem.build b/71/problem.build new file mode 100644 index 0000000..ec100fe Binary files /dev/null and b/71/problem.build differ diff --git a/71/problem.build.dSYM/Contents/Info.plist b/71/problem.build.dSYM/Contents/Info.plist new file mode 100644 index 0000000..09786f1 --- /dev/null +++ b/71/problem.build.dSYM/Contents/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleIdentifier + com.apple.xcode.dsym.problem.build + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + dSYM + CFBundleSignature + ???? + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/71/problem.build.dSYM/Contents/Resources/DWARF/problem.build b/71/problem.build.dSYM/Contents/Resources/DWARF/problem.build new file mode 100644 index 0000000..a5d3197 Binary files /dev/null and b/71/problem.build.dSYM/Contents/Resources/DWARF/problem.build differ diff --git a/71/problem.set b/71/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/71/stdin b/71/stdin new file mode 100644 index 0000000..35fa789 --- /dev/null +++ b/71/stdin @@ -0,0 +1,2 @@ +-123456789 +-987654321 diff --git a/71/stdout b/71/stdout new file mode 100644 index 0000000..f8a9e09 --- /dev/null +++ b/71/stdout @@ -0,0 +1 @@ +121932631112635269 diff --git a/72/main.c b/72/main.c new file mode 100644 index 0000000..679bf88 --- /dev/null +++ b/72/main.c @@ -0,0 +1,34 @@ +#include +int stack[256], top = 0; +void push(int node); +void pop(void); + +int main(void){ + int N[1000], train = 0; + int number, i; + scanf("%d",&number); + for(i = 0; i < number; i++) scanf("%d",&N[i]); + i = 0; + int if_ok = 1; + while(i < number){ + if(train > number){ + if_ok = 0; + break; + } + if(stack[top-1] != N[i]){ + push(++train); + } + else pop(),i++; + } + if(!if_ok) printf("No\n"); + else printf("Yes\n"); + return 0; +} + +void push(int node){ + stack[top++] = node; +} +void pop(void){ + stack[top] = 0; + top--; +} diff --git a/72/problem.build b/72/problem.build new file mode 100644 index 0000000..f4a91b3 Binary files /dev/null and b/72/problem.build differ diff --git a/72/problem.build.dSYM/Contents/Info.plist b/72/problem.build.dSYM/Contents/Info.plist new file mode 100644 index 0000000..09786f1 --- /dev/null +++ b/72/problem.build.dSYM/Contents/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleIdentifier + com.apple.xcode.dsym.problem.build + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + dSYM + CFBundleSignature + ???? + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/72/problem.build.dSYM/Contents/Resources/DWARF/problem.build b/72/problem.build.dSYM/Contents/Resources/DWARF/problem.build new file mode 100644 index 0000000..e546a3b Binary files /dev/null and b/72/problem.build.dSYM/Contents/Resources/DWARF/problem.build differ diff --git a/72/problem.set b/72/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/72/stdin b/72/stdin new file mode 100644 index 0000000..5885a6a --- /dev/null +++ b/72/stdin @@ -0,0 +1,2 @@ +5 +1 2 3 4 5 0 diff --git a/72/stdout b/72/stdout new file mode 100644 index 0000000..dcd7a5d --- /dev/null +++ b/72/stdout @@ -0,0 +1 @@ +Yes diff --git a/73/main.c b/73/main.c new file mode 100644 index 0000000..e42b133 --- /dev/null +++ b/73/main.c @@ -0,0 +1,20 @@ +#include + +int main(void){ + int number, i, n[1024]; + scanf("%d",&number); + for(i = 0; i < number; i++) scanf("%d",&n[i]); + int if_ch = 1, tmp, count = 0; + while(if_ch){ + if_ch = 0; + for(i = 0; i < number; i++) + if(n[i] > n[i+1]){ + tmp = n[i]; + n[i] = n[i+1]; + n[i+1] = tmp; + if_ch = 1, count++; + } + } + printf("%d\n",count); + return 0; +} diff --git a/73/problem.build b/73/problem.build new file mode 100644 index 0000000..0466fe3 Binary files /dev/null and b/73/problem.build differ diff --git a/73/problem.set b/73/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/73/stdin b/73/stdin new file mode 100644 index 0000000..bfb6b77 --- /dev/null +++ b/73/stdin @@ -0,0 +1,2 @@ +5 +9 1 0 5 4 diff --git a/73/stdout b/73/stdout new file mode 100644 index 0000000..1e8b314 --- /dev/null +++ b/73/stdout @@ -0,0 +1 @@ +6 diff --git a/74/main.c b/74/main.c new file mode 100644 index 0000000..c7085cd --- /dev/null +++ b/74/main.c @@ -0,0 +1,10 @@ +#include + +int main(void){ + int number; + char string[1024]; + scanf("%d\n",&number); + gets(string); + printf("%s",string); + return 0; +} diff --git a/74/problem.build b/74/problem.build new file mode 100644 index 0000000..16e0eb2 Binary files /dev/null and b/74/problem.build differ diff --git a/74/problem.set b/74/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/74/stdin b/74/stdin new file mode 100644 index 0000000..815b1e4 --- /dev/null +++ b/74/stdin @@ -0,0 +1,2 @@ +7 +101 102 103 104 105 diff --git a/74/stdout b/74/stdout new file mode 100644 index 0000000..7d801de --- /dev/null +++ b/74/stdout @@ -0,0 +1 @@ +101 102 103 104 105 \ No newline at end of file diff --git a/75/main.c b/75/main.c new file mode 100644 index 0000000..fffb6b0 --- /dev/null +++ b/75/main.c @@ -0,0 +1,28 @@ +#include +int stack[256]; +int main(void){ + int number, i, top = 0, tmp, k; + scanf("%d",&number); + for(i = 0; i < number; i++){ + scanf("%d",&tmp); + int if_in = 0; + for(k = 0; k < top; k++) + if(tmp == stack[k]){ + if_in = 1; + break; + } + if(!if_in) stack[top++] = tmp; + else + for(k = 0; k < top; k++){ + if(stack[k] == tmp) stack[k] = -1; + } + + } + for(i = 0; i < top; i++) + if(stack[i] != -1){ + if(i) printf(" "); + printf("%d",stack[i]); + } + printf("\n"); + return 0; +} diff --git a/75/problem.build b/75/problem.build new file mode 100644 index 0000000..064e84e Binary files /dev/null and b/75/problem.build differ diff --git a/75/problem.set b/75/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/75/stdin b/75/stdin new file mode 100644 index 0000000..e122d96 --- /dev/null +++ b/75/stdin @@ -0,0 +1,2 @@ +10 +12 16 16 17 19 20 22 27 34 22 diff --git a/75/stdout b/75/stdout new file mode 100644 index 0000000..d47b8fa --- /dev/null +++ b/75/stdout @@ -0,0 +1 @@ +12 17 19 20 27 34 diff --git a/76/main.c b/76/main.c new file mode 100644 index 0000000..118e156 --- /dev/null +++ b/76/main.c @@ -0,0 +1,59 @@ +#include +#include +#define MAX 1024 + +int sub(char *a, char *b, int lena, int lenb); +int max(char *a, char *b, int lena, int lenb); + +int main(void){ + char stra[MAX], strb[MAX]; + scanf("%s",stra); + scanf("%s",strb); + int i, lena = strlen(stra), lenb = strlen(strb); + int if_zf = 1; + if(stra[0] == '-') stra[0] = 48, if_zf *= -1; + if(strb[0] == '-') strb[0] = 48, if_zf *= -1; + if(!~if_zf) printf("-"); + for(i = 0; i < lena; i++) stra[i] -= 48; + for(i = 0; i < lenb; i++) strb[i] -= 48; + int plenb = lenb; + while(max(stra,strb,lena,plenb) >= 0) strb[plenb++] = 0; + if(plenb == lenb) printf("0"); + while(plenb > lenb){ + int shang = 0; + if(max(stra,strb,lena,plenb) <= 0){ + plenb--; + } + while(max(stra,strb,lena,plenb) >= 0) sub(stra,strb,lena,plenb), shang++; + printf("%d",shang); + } + printf("\n"); + return 0; +} + +int sub(char *a, char *b, int lena, int lenb){ + int i, count = lenb-1; + for(i = lena-1; i >= lena - lenb; i--, count--) a[i] = a[i] - b[count]; + for(i = lena-1; i >= 0; i--) + if(a[i] < 0){ + a[i] += 10; + a[i-1] -= 1; + } + return 0; +} + +int max(char *a, char *b, int lena, int lenb){ + int i,tlena = lena, tlenb = lenb; + for(i = 0; a[i] == 0; i++) tlena--; + for(i = 0; b[i] == 0; i++) tlenb--; + if(tlena > tlenb) return 1; + else if(tlena == tlenb){ + int j = lena - tlena, k = lenb - tlenb; + while(a[j] == b[k] && j < lena && k < lenb) k++,j++; + if(a[j] > b[k]) return 1; + else if(a[j] < b[k]) return -1; + } + else return -1; + return 0; +} + diff --git a/76/problem.build b/76/problem.build new file mode 100644 index 0000000..1008312 Binary files /dev/null and b/76/problem.build differ diff --git a/76/problem.build.dSYM/Contents/Info.plist b/76/problem.build.dSYM/Contents/Info.plist new file mode 100644 index 0000000..09786f1 --- /dev/null +++ b/76/problem.build.dSYM/Contents/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleIdentifier + com.apple.xcode.dsym.problem.build + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + dSYM + CFBundleSignature + ???? + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/76/problem.build.dSYM/Contents/Resources/DWARF/problem.build b/76/problem.build.dSYM/Contents/Resources/DWARF/problem.build new file mode 100644 index 0000000..794e3da Binary files /dev/null and b/76/problem.build.dSYM/Contents/Resources/DWARF/problem.build differ diff --git a/76/problem.set b/76/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/76/stdin b/76/stdin new file mode 100644 index 0000000..53d893f --- /dev/null +++ b/76/stdin @@ -0,0 +1,2 @@ +9870654321 +123 diff --git a/76/stdout b/76/stdout new file mode 100644 index 0000000..0c6f97d --- /dev/null +++ b/76/stdout @@ -0,0 +1 @@ +80249222 diff --git a/77/main.c b/77/main.c new file mode 100644 index 0000000..1a3c337 --- /dev/null +++ b/77/main.c @@ -0,0 +1,39 @@ +#include +#include + +int main(void) +{ + char string[100][100],atm[100]; + int i,k,temp; + int count = 0; + scanf("%d",&temp); + for(i=0;istrlen(string[i+1])) strcpy(atm,string[i]),strcpy(string[i],string[i+1]),strcpy(string[i+1],atm); + if((!temp%2)){ + if(count++)printf(" "); + for(i=0;i0;i=i-2){ + if(i) printf(" "); + printf("%s",string[i]); + } + } + else{ + if(count++) printf(" "); + for(i=0;i0;i=i-2){ + if(i) printf(" "); + printf("%s",string[i]); + } + } + return 0; +} diff --git a/77/problem.build b/77/problem.build new file mode 100644 index 0000000..5ed92db Binary files /dev/null and b/77/problem.build differ diff --git a/77/problem.set b/77/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/77/stdin b/77/stdin new file mode 100644 index 0000000..2a254c4 --- /dev/null +++ b/77/stdin @@ -0,0 +1,2 @@ +7 +EWFewgBo Pat Jeafewjoiewn Kevin Claude William Marybeth diff --git a/77/stdout b/77/stdout new file mode 100644 index 0000000..3f4ad67 --- /dev/null +++ b/77/stdout @@ -0,0 +1 @@ +Pat Kevin William Jeafewjoiewn Marybeth Claude EWFewgBo \ No newline at end of file diff --git a/78/main.c b/78/main.c new file mode 100644 index 0000000..25ca2e8 --- /dev/null +++ b/78/main.c @@ -0,0 +1,42 @@ +#include +#include + +char stra[256] = {0}, strb[256]={0}; +int deala[256], dealb[256]; +unsigned long MAX; + +int doAdd(unsigned long MAX , int *deala, int *dealb); + +int main(void) +{ + long i, j; + scanf("%s",stra) ; + scanf("%s",strb) ; + unsigned long lena = strlen(stra) ; + unsigned long lenb = strlen(strb) ; + if(lena > lenb ) + MAX = lena ; + MAX = lenb ; + for(j = 0, i = strlen(stra)- 1; i >= 0; i--) + deala[j++] = stra[i] - '0'; + for(j = 0 , i = lenb - 1; i >= 0; i--) + dealb[j++] = strb[i] - '0'; + doAdd (MAX, deala, dealb) ; + for(i = 100; i >= 0; i--) if(deala[i] != 0) break; + for(;i>=0;i--) printf("%d" ,deala[i]); + printf("\n") ; +} +int doAdd(unsigned long MAX, int *deala, int *dealb) +{ + int i; + for(i = 0; i < MAX; i++) + { + deala[i] += dealb[i]; + if(deala[i] > 9) + { + deala[i] -= 10; + deala[i+1]++; + } + } + return 0; +} diff --git a/78/problem.build b/78/problem.build new file mode 100644 index 0000000..6d42320 Binary files /dev/null and b/78/problem.build differ diff --git a/78/problem.set b/78/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/78/stdin b/78/stdin new file mode 100644 index 0000000..292d5c4 --- /dev/null +++ b/78/stdin @@ -0,0 +1,2 @@ +123456752525023 +-42302352453249820395 diff --git a/78/stdout b/78/stdout new file mode 100644 index 0000000..60e87f3 --- /dev/null +++ b/78/stdout @@ -0,0 +1 @@ +-342302475910002345418 diff --git a/79/main.c b/79/main.c new file mode 100644 index 0000000..748a2c7 --- /dev/null +++ b/79/main.c @@ -0,0 +1,30 @@ +#include + +int main(void){ + int number, last; + int pep[64] = {0}, rlst; + int cards[20],i; + scanf("%d %d",&number,&last); + rlst = number; + for(i = 0; i < 20; i++) scanf("%d",&cards[i]); + int count = 0; + while(count < 20 && rlst > last){ + int k = 0; + for(i = 1; i <= number; i++){ + if(pep[i] != -1){ + if(!(++k % cards[count])){ + pep[i] = -1; + if (--rlst <= last) break; + } + } + } + count++; + } + for(i = 1; i <= number; i++) + if(pep[i] != -1){ + if(i > 1) printf(" "); + printf("%d",i); + } + printf("\n"); + return 0; +} diff --git a/79/problem.build b/79/problem.build new file mode 100644 index 0000000..3a11595 Binary files /dev/null and b/79/problem.build differ diff --git a/79/problem.set b/79/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/79/stdin b/79/stdin new file mode 100644 index 0000000..b6cacc7 --- /dev/null +++ b/79/stdin @@ -0,0 +1,2 @@ +10 2 +3 5 4 3 2 9 6 10 10 6 2 6 7 3 4 7 4 5 3 2 diff --git a/79/stdout b/79/stdout new file mode 100644 index 0000000..9ebabbc --- /dev/null +++ b/79/stdout @@ -0,0 +1 @@ +1 8 diff --git a/80/main.c b/80/main.c new file mode 100644 index 0000000..57fb72d --- /dev/null +++ b/80/main.c @@ -0,0 +1,21 @@ +#include + +int main(void){ + int number, idx; + int works[128]; + int i, tmp, head; + scanf("%d %d",&number,&idx); + head = 0; + for(i = 0;i < number; i++) scanf("%d",&works[i]); + int time = 0; + do{ + int if_do = 1; + for(i = 0; i < number; i++) + if(works[i] > works[head] && if_do) if_do = 0; + if(if_do) tmp = head, time++, works[head] = 0; + if(head == number - 1) head = 0; + else head++; + }while(tmp != idx); + printf("%d\n",time); + return 0; +} diff --git a/80/problem.build b/80/problem.build new file mode 100644 index 0000000..64bce38 Binary files /dev/null and b/80/problem.build differ diff --git a/80/problem.set b/80/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/80/stdin b/80/stdin new file mode 100644 index 0000000..a671aba --- /dev/null +++ b/80/stdin @@ -0,0 +1,2 @@ +4 2 +1 2 3 4 diff --git a/80/stdout b/80/stdout new file mode 100644 index 0000000..0cfbf08 --- /dev/null +++ b/80/stdout @@ -0,0 +1 @@ +2 diff --git a/81/main.c b/81/main.c new file mode 100644 index 0000000..d3b5336 --- /dev/null +++ b/81/main.c @@ -0,0 +1,61 @@ +#include + +int ifdc(int *number); +int ifdb(int *number); +int iffb(int *number); + +int main(void){ + int i, number[5]; + for(i = 0; i < 5; i++) scanf("%d",&number[i]); + if(ifdc(number)){ + int gc = number[1] - number[0] ,tmp = number[4]; + for(i = 0; i < 5; i++) printf("%d ",tmp += gc); + } + else if(ifdb(number)){ + int gb = number[1] / number[0], tmp = number[4]; + for(i = 0; i < 5; i++) printf("%d ",tmp *= gb); + } + else if(iffb(number)){ + int tmp[7] = {number[3], number[4]}; + for(i = 2; i < 7; i++){ + tmp[i] = tmp[i-1] + tmp[i-2]; + printf("%d ",tmp[i]); + } + } + printf("\n"); + return 0; +} + +int ifdc(int *number){ + int i, gc = number[1] - number[0]; + int if_is = 1; + for(i = 1; i < 4; i++) + if(number[i+1] - number[i] != gc && if_is) if_is = 0; + return if_is; +} + +int ifdb(int *number){ + int i; + double gb = (double)number[1] / number[0]; + if (gb - (int)gb > 10e-6) return 0; + int if_is = 1; + for(i = 1; i < 4; i++) + if(number[i+1] / number[i] != gb && if_is) if_is = 0; + return if_is; + +} + +int iffb(int *number){ + int i, tmp = number[0] + number[1]; + int if_is = 1; + for(i = 2; i < 5; i++){ + if(number[i] == tmp){ + tmp = number[i] + number[i-1]; + } + else{ + if_is = 0; + break; + } + } + return if_is; +} diff --git a/81/problem.build b/81/problem.build new file mode 100644 index 0000000..e1e1465 Binary files /dev/null and b/81/problem.build differ diff --git a/81/problem.set b/81/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/81/stdin b/81/stdin new file mode 100644 index 0000000..4bd416b --- /dev/null +++ b/81/stdin @@ -0,0 +1 @@ +2 3 5 8 13 diff --git a/81/stdout b/81/stdout new file mode 100644 index 0000000..fea5ce8 --- /dev/null +++ b/81/stdout @@ -0,0 +1 @@ +21 34 55 89 144 diff --git a/82/main.c b/82/main.c new file mode 100644 index 0000000..8a7b9b2 --- /dev/null +++ b/82/main.c @@ -0,0 +1,19 @@ +#include + +int main(void){ + int i, j; + int k = i; + int max = 0; + scanf("%d %d",&i,&j); + for(;k <= j; k++){ + int temp = k, count = 0; + while(temp != 1){ + if(temp % 2) temp = 3 * temp + 1; + else temp /= 2; + count++; + } + if(count > max) max = count; + } + printf("%d %d %d\n",i,j,max+1); + return 0; +} diff --git a/82/problem.build b/82/problem.build new file mode 100644 index 0000000..f093176 Binary files /dev/null and b/82/problem.build differ diff --git a/82/problem.set b/82/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/82/stdin b/82/stdin new file mode 100644 index 0000000..aba0664 --- /dev/null +++ b/82/stdin @@ -0,0 +1 @@ +1 10 diff --git a/82/stdout b/82/stdout new file mode 100644 index 0000000..d54d8e8 --- /dev/null +++ b/82/stdout @@ -0,0 +1 @@ +1 10 1 diff --git a/83/main.c b/83/main.c new file mode 100644 index 0000000..4510258 --- /dev/null +++ b/83/main.c @@ -0,0 +1,34 @@ +#include +#include +#include + +int main(void){ + char string[8192], r_string[8192]; + gets(r_string); + int len = strlen(r_string); + for(int i = 0; i < len; i++){ + if((r_string[i] >= 'a' && r_string[i] <= 'z') || (r_string[i] >= 'A' && r_string[i] <= 'Z')) + string[i] = tolower(r_string[i]); + else string[i] = '#'; + } + string[len]='\0'; + int tail = len - 1, mtl = tail; + int i, mi, max = 0, k, mk, tk = 0, ti = 0; + for(i = 0; i < len; i++){ + k = tail; + for(k = tail; k > i; k--){ + mk = k; + mi = i; + do{ + if(string[mi] != string[mk]) break; + while(string[++mi] == '#'); + while(string[--mk] == '#'); + }while(mk > mi && string[mi] == string[mk]); + if(mk <= mi && k - i > max) tk = k, ti = i, max = k - i; + } + } + if(tk - ti >= 0) + for(i = ti; i <= tk; i++) printf("%c",r_string[i]); + printf("\n"); + return 0; +} diff --git a/83/problem.build b/83/problem.build new file mode 100644 index 0000000..880677b Binary files /dev/null and b/83/problem.build differ diff --git a/83/problem.build.dSYM/Contents/Info.plist b/83/problem.build.dSYM/Contents/Info.plist new file mode 100644 index 0000000..09786f1 --- /dev/null +++ b/83/problem.build.dSYM/Contents/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleIdentifier + com.apple.xcode.dsym.problem.build + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + dSYM + CFBundleSignature + ???? + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/83/problem.build.dSYM/Contents/Resources/DWARF/problem.build b/83/problem.build.dSYM/Contents/Resources/DWARF/problem.build new file mode 100644 index 0000000..7093b8a Binary files /dev/null and b/83/problem.build.dSYM/Contents/Resources/DWARF/problem.build differ diff --git a/83/problem.set b/83/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/83/stdin b/83/stdin new file mode 100644 index 0000000..c30e4ac --- /dev/null +++ b/83/stdin @@ -0,0 +1 @@ +fwihk,Todo level odot,K diff --git a/83/stdout b/83/stdout new file mode 100644 index 0000000..251e6db --- /dev/null +++ b/83/stdout @@ -0,0 +1 @@ +k,Todo level odot,K diff --git a/84/main.c b/84/main.c new file mode 100644 index 0000000..ade7b6a --- /dev/null +++ b/84/main.c @@ -0,0 +1,20 @@ +#include + +int main(void){ + double rose, fell, exact, tmp; + scanf("%lf %lf",&rose,&fell); + exact = rose/fell; + tmp = exact - (int)(rose/fell); + printf("%d/1\n",(int)(rose/fell)); + for(int i = 1; i <= fell; i++){ + for(int j = rose / fell; j <= rose; j++){ + double temp = exact - (double)j/i; + temp = temp>0?temp:-temp; + if(temp >= 0 && temp < tmp){ + printf("%d/%d\n",j,i); + tmp = temp; + } + } + } + return 0; +} diff --git a/84/problem.build b/84/problem.build new file mode 100644 index 0000000..50b3991 Binary files /dev/null and b/84/problem.build differ diff --git a/84/problem.set b/84/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/84/stdin b/84/stdin new file mode 100644 index 0000000..0f64a0c --- /dev/null +++ b/84/stdin @@ -0,0 +1 @@ +5 4 diff --git a/84/stdout b/84/stdout new file mode 100644 index 0000000..f734a78 --- /dev/null +++ b/84/stdout @@ -0,0 +1,3 @@ +1/1 +4/3 +5/4 diff --git a/85/main.c b/85/main.c new file mode 100644 index 0000000..2360bac --- /dev/null +++ b/85/main.c @@ -0,0 +1,12 @@ +#include + +int main(void){ + long long N,count = 0; + scanf("%lld",&N); + for(long long i = 1; i < N; i++){ + double j = (double)(N-i)/(i+1); + if(j - (int)j < 10e-6) count++; + } + printf("%lld\n",count/2); + return 0; +} diff --git a/85/problem.build b/85/problem.build new file mode 100644 index 0000000..e465a28 Binary files /dev/null and b/85/problem.build differ diff --git a/85/problem.set b/85/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/85/stdin b/85/stdin new file mode 100644 index 0000000..b4de394 --- /dev/null +++ b/85/stdin @@ -0,0 +1 @@ +11 diff --git a/85/stdout b/85/stdout new file mode 100644 index 0000000..0cfbf08 --- /dev/null +++ b/85/stdout @@ -0,0 +1 @@ +2 diff --git a/86/main.c b/86/main.c new file mode 100644 index 0000000..dfee905 --- /dev/null +++ b/86/main.c @@ -0,0 +1,18 @@ +#include + +int main(void){ + int number, A[100], B[100], As = 0, Bs = 0; + scanf("%d",&number); + int i; + for(i = 0; i < number; i++) scanf("%d",A+i); + for(i = 0; i < number; i++) scanf("%d",B+i); + for(i = 0; i < number; i++){ + if(A[i] > B[i]) As++; + else if(A[i] < B[i]) Bs++; + } + if(As > Bs) printf("A"); + else if(As < Bs) printf("B"); + else printf("="); + printf("\n"); + return 0; +} diff --git a/86/problem.build b/86/problem.build new file mode 100644 index 0000000..ea98dac Binary files /dev/null and b/86/problem.build differ diff --git a/86/problem.set b/86/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/86/stdin b/86/stdin new file mode 100644 index 0000000..dea023b --- /dev/null +++ b/86/stdin @@ -0,0 +1,3 @@ +5 +1 2 3 4 5 +2 7 1 1 2 diff --git a/86/stdout b/86/stdout new file mode 100644 index 0000000..f70f10e --- /dev/null +++ b/86/stdout @@ -0,0 +1 @@ +A diff --git a/87/main.c b/87/main.c new file mode 100644 index 0000000..af8e61c --- /dev/null +++ b/87/main.c @@ -0,0 +1,31 @@ +#include +#include +#define PF(x) ((x)*(x)) + +int main(void){ + int number ,i; + double hs[600]; + scanf("%d",&number); + for(i = 0; i < number; i++)scanf("%lf",hs+i); + int if_ch = 1; + while(if_ch){ + if_ch = 0; + for(i = 0; i < number-1; i++) + if(hs[i] < hs[i+1]){ + double temp = hs[i]; + hs[i] = hs[i+1]; + hs[i+1] = temp; + if_ch = 1; + } + } + i = 0; + double all = 0.0; + int count = 0; + while(all < 20 && i < number){ + all += sqrt(PF(hs[i]) - 1) * 2; + i++; + count++; + } + printf("%d\n",count); + return 0; +} diff --git a/87/problem.build b/87/problem.build new file mode 100644 index 0000000..a6f2a1b Binary files /dev/null and b/87/problem.build differ diff --git a/87/problem.set b/87/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/87/stdin b/87/stdin new file mode 100644 index 0000000..64eaa2f --- /dev/null +++ b/87/stdin @@ -0,0 +1,2 @@ +5 +2 3.2 4 4.5 6 diff --git a/87/stdout b/87/stdout new file mode 100644 index 0000000..0cfbf08 --- /dev/null +++ b/87/stdout @@ -0,0 +1 @@ +2 diff --git a/88/main.c b/88/main.c new file mode 100644 index 0000000..d11ee85 --- /dev/null +++ b/88/main.c @@ -0,0 +1,36 @@ +#include +#include + +int main(void){ + char head[6]; + int number, turn; + scanf("%s %d",head,&number); + switch(head[0]){ + case 'W': + turn = 0; + break; + case 'N': + turn = 1; + break; + case 'E': + turn = 2; + break; + case 'S': + turn = 3; + break; + } + for(int i = 0; i < number; i++){ + int temp; + scanf("%d",&temp); + if(!temp) turn--; + else turn++; + if(turn < 0) turn = 3; + else if(turn > 3) turn = 0; + } + if(turn == 0) printf("West"); + else if(turn == 2) printf("East"); + else if(turn == 1) printf("North"); + else printf("South"); + printf("\n"); + return 0; +} diff --git a/88/problem.build b/88/problem.build new file mode 100644 index 0000000..68fe95b Binary files /dev/null and b/88/problem.build differ diff --git a/88/problem.build.dSYM/Contents/Info.plist b/88/problem.build.dSYM/Contents/Info.plist new file mode 100644 index 0000000..09786f1 --- /dev/null +++ b/88/problem.build.dSYM/Contents/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleIdentifier + com.apple.xcode.dsym.problem.build + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + dSYM + CFBundleSignature + ???? + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/88/problem.build.dSYM/Contents/Resources/DWARF/problem.build b/88/problem.build.dSYM/Contents/Resources/DWARF/problem.build new file mode 100644 index 0000000..bc72833 Binary files /dev/null and b/88/problem.build.dSYM/Contents/Resources/DWARF/problem.build differ diff --git a/88/problem.set b/88/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/88/stdin b/88/stdin new file mode 100644 index 0000000..cede810 --- /dev/null +++ b/88/stdin @@ -0,0 +1,2 @@ +East 6 +0 0 0 0 0 0 diff --git a/88/stdout b/88/stdout new file mode 100644 index 0000000..fee70a7 --- /dev/null +++ b/88/stdout @@ -0,0 +1 @@ +West diff --git a/89/main.c b/89/main.c new file mode 100644 index 0000000..79368db --- /dev/null +++ b/89/main.c @@ -0,0 +1,11 @@ +#include + +int main(void){ + double height; + scanf("%lf",&height); + double days = height / 5; + if(days - (int)days > 10e-6) printf("%d",(int)days+1); + else printf("%d",(int)days-1); + printf("\n"); + return 0; +} diff --git a/89/problem.build b/89/problem.build new file mode 100644 index 0000000..c87eccc Binary files /dev/null and b/89/problem.build differ diff --git a/89/problem.set b/89/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/89/stdin b/89/stdin new file mode 100644 index 0000000..83b33d2 --- /dev/null +++ b/89/stdin @@ -0,0 +1 @@ +1000 diff --git a/89/stdout b/89/stdout new file mode 100644 index 0000000..3bc92d4 --- /dev/null +++ b/89/stdout @@ -0,0 +1 @@ +201 diff --git a/90/main.c b/90/main.c new file mode 100644 index 0000000..5ccaab9 --- /dev/null +++ b/90/main.c @@ -0,0 +1,32 @@ +#include + +long n[10] = {1,1}, i; + +int DFS(int, long, long); + +int main(void){ + long target; + scanf("%ld",&target); + for(i = 2; i < 10; i++) n[i] = n[i-1] * i; + for(i = 9; i > 0; i--){ + if(n[i] < target) break; + } + if(DFS(i,0,target)) printf("YES"); + else printf("NO"); + printf("\n"); + return 0; +} + +int DFS(int t, long temp, long target){ + if(t > 0){ + long t_tmp = temp + n[t]; + if(t_tmp > target) return 0; + else if(t_tmp == target) return 1; + else{ + for(int i = t-1; i > 0; i--){ + if(DFS(i,t_tmp,target)) return 1; + } + } + } + return 0; +} diff --git a/90/problem.build b/90/problem.build new file mode 100644 index 0000000..74e44fb Binary files /dev/null and b/90/problem.build differ diff --git a/90/problem.set b/90/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/90/stdin b/90/stdin new file mode 100644 index 0000000..ec63514 --- /dev/null +++ b/90/stdin @@ -0,0 +1 @@ +9 diff --git a/90/stdout b/90/stdout new file mode 100644 index 0000000..e15561d --- /dev/null +++ b/90/stdout @@ -0,0 +1,5 @@ +6 +3 : 6 +2 : 8 +1 : 9 +YES diff --git a/91/main.c b/91/main.c new file mode 100644 index 0000000..532a77b --- /dev/null +++ b/91/main.c @@ -0,0 +1,59 @@ +#include +#define MS 6 +long long count = 0; +int sort(int idx, int * planes, int A, int C); +long long cstep(int height); +int main(void){ + int n; + while(scanf("%d",&n) && n){ + int targets[64]={0}, planes[64]={0}; + count = 0; + for(int i = 0; i < n; i++) scanf("%d",planes+i); + for(int i = 0; i < n; i++) scanf("%d",targets+i); + int idx = 0; + for(int i = n-1; ~i; i--){ + if(planes[i] != targets[i]){ + idx = i; + break; + } + } + sort(idx-1,planes,planes[idx-1],MS-planes[idx]-targets[idx]); + planes[idx] = targets[idx]; + count++; + if(idx > 0){ + int town_idx = planes[idx-1]; + for(int i = idx-1; ~i; i--){ + if(town_idx != targets[i]){ + count += cstep(i); + count++; + town_idx = MS - town_idx - targets[i]; + } + } + } + printf("%lld\n",count); + } + return 0; +} + +long long cstep(int height){ + int result = 1; + for(int i = 0; i < height; i++) result *= 2; + return result-1; +} + +int sort(int idx, int * planes, int A, int C){ + if(idx > 0){ + if(A != C){ + sort(idx-1, planes, planes[idx-1], MS-A-C); + count++; + planes[idx] = C; + sort(idx-1, planes, MS-A-C, C); + } + else sort(idx-1, planes, planes[idx-1], C); + } + else{ + count++; + planes[idx] = C; + } + return 0; +} diff --git a/91/problem.build b/91/problem.build new file mode 100644 index 0000000..ce933ad Binary files /dev/null and b/91/problem.build differ diff --git a/91/problem.set b/91/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/91/stdin b/91/stdin new file mode 100644 index 0000000..1a5df9a --- /dev/null +++ b/91/stdin @@ -0,0 +1,7 @@ +3 +1 2 3 +3 2 1 +3 +1 1 1 +2 2 2 +0 diff --git a/91/stdout b/91/stdout new file mode 100644 index 0000000..dde5d5d --- /dev/null +++ b/91/stdout @@ -0,0 +1,2 @@ +3 +7 diff --git a/92/main.c b/92/main.c new file mode 100644 index 0000000..cb111b8 --- /dev/null +++ b/92/main.c @@ -0,0 +1,15 @@ +#include +#include + +int main(void){ + int i, n; + scanf("%d",&n); + + for(i = 0; i < n; i++){ + double x, y, s; + scanf("%lf %lf",&x,&y); + s = 3.1415926 * (x*x + y*y) / 100; + printf("%d %d\n",i+1,(int)s+1); + } + return 0; +} diff --git a/92/problem.build b/92/problem.build new file mode 100644 index 0000000..535bce5 Binary files /dev/null and b/92/problem.build differ diff --git a/92/problem.set b/92/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/92/stdin b/92/stdin new file mode 100644 index 0000000..06501f5 --- /dev/null +++ b/92/stdin @@ -0,0 +1,3 @@ +2 +1.0 1.0 +25.0 0.0 diff --git a/92/stdout b/92/stdout new file mode 100644 index 0000000..a591c7b --- /dev/null +++ b/92/stdout @@ -0,0 +1,2 @@ +1 1 +2 20 diff --git a/93/main.c b/93/main.c new file mode 100644 index 0000000..4bc0d38 --- /dev/null +++ b/93/main.c @@ -0,0 +1,41 @@ +#include +#include +int pm(const long n); + +int main(void){ + long a,d,n; + while(scanf("%ld %ld %ld",&a,&d,&n) == 3 && a+d+n){ + long now = a, count; + if(!d && !pm(n)){ + printf("-1\n"); + continue; + } + if(pm(a) && n == 1){ + printf("%ld\n",a); + continue; + } + for(count = 0; count < n;){ + if(pm(now)) count++; + if(count >= n){ + printf("%ld\n",now); + break; + } + now += d; + } + } + return 0; +} + +int pm(const long n){ + if(n == 1) return 0; + else if(n == 2) return 1; + long temp = n, sqtmp = sqrt(temp); + int if_pn = 1; + for(int k = 2; k <= sqtmp; k++){ + if(!(temp%k)){ + if_pn = 0; + break; + } + } + return if_pn; +} diff --git a/93/problem.build b/93/problem.build new file mode 100644 index 0000000..61fda39 Binary files /dev/null and b/93/problem.build differ diff --git a/93/problem.set b/93/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/93/stdin b/93/stdin new file mode 100644 index 0000000..5ff5208 --- /dev/null +++ b/93/stdin @@ -0,0 +1,6 @@ +367 186 151 +179 10 203 +271 37 39 +103 230 1 +2 1 5 +0 0 0 diff --git a/93/stdout b/93/stdout new file mode 100644 index 0000000..9c09614 --- /dev/null +++ b/93/stdout @@ -0,0 +1,5 @@ +92809 +6709 +12037 +103 +11 diff --git a/94/main.c b/94/main.c new file mode 100644 index 0000000..ea8e00f --- /dev/null +++ b/94/main.c @@ -0,0 +1,31 @@ +#include +struct info{ + char name[16]; + int solved; + int ptime; +}; + +int main(void){ + int n, max = 0, min = -1, idx = 0; + struct info infos[64]; + scanf("%d",&n); + for(int i = 0; i < n; i++){ + infos[i].solved = 0; + infos[i].ptime = 0; + scanf("%s",infos[i].name); + for(int k = 0; k < 4; k++){ + int s = 0, p = 0; + scanf("%d %d",&s,&p); + if(p > 0){ + infos[i].solved++; + infos[i].ptime += p + 20 * (s-1); + } + } + if(min == -1) min = infos[i].ptime; + if(infos[i].solved > max) max = infos[i].solved; + if(infos[i].solved == max && infos[i].ptime < min) min = infos[i].ptime; + if(infos[i].solved == max && infos[i].ptime == min) idx = i; + } + printf("%s %d %d\n",infos[idx].name,infos[idx].solved,infos[idx].ptime); + return 0; +} diff --git a/94/problem.build b/94/problem.build new file mode 100644 index 0000000..c8cfe75 Binary files /dev/null and b/94/problem.build differ diff --git a/94/problem.set b/94/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/94/stdin b/94/stdin new file mode 100644 index 0000000..84b3a8e --- /dev/null +++ b/94/stdin @@ -0,0 +1,5 @@ +4 +Stars 2 20 5 0 4 190 3 220 +Rockets 5 180 1 0 2 0 3 100 +Penguins 1 15 3 120 1 300 4 0 +Marsupials 9 0 3 100 2 220 3 80 diff --git a/94/stdout b/94/stdout new file mode 100644 index 0000000..5e38d55 --- /dev/null +++ b/94/stdout @@ -0,0 +1 @@ +Penguins 3 475 diff --git a/95/main.c b/95/main.c new file mode 100644 index 0000000..348e4b7 --- /dev/null +++ b/95/main.c @@ -0,0 +1,16 @@ +#include + +int main(void){ + int n; + while(scanf("%d",&n) && ~n){ + int last = 0, mile = 0; + for(int i = 0; i < n; i++){ + int now, speed; + scanf("%d %d",&speed,&now); + mile += speed * (now-last); + last = now; + } + printf("%d\n",mile); + } + return 0; +} diff --git a/95/problem.build b/95/problem.build new file mode 100644 index 0000000..dc34598 Binary files /dev/null and b/95/problem.build differ diff --git a/95/problem.set b/95/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/95/stdin b/95/stdin new file mode 100644 index 0000000..348584a --- /dev/null +++ b/95/stdin @@ -0,0 +1,8 @@ +3 +20 2 +30 6 +10 7 +2 +60 1 +30 5 +-1 diff --git a/95/stdout b/95/stdout new file mode 100644 index 0000000..60cb724 --- /dev/null +++ b/95/stdout @@ -0,0 +1,2 @@ +170 +180 diff --git a/96/main.c b/96/main.c new file mode 100644 index 0000000..065a84d --- /dev/null +++ b/96/main.c @@ -0,0 +1,75 @@ +#include + +int do_find(int *stick, int count, int idx, int tmp, int k, int n); + +int main(void){ + int n, sticks[64],sum,max; + //printf("INPUT:\n"); + while(scanf("%d",&n) && n){ + sum = 0; + max = 0; + for(int i = 0; i < n; i++){ + int temp; + scanf("%d",&temp); + if(temp > max) max = temp; + sum += temp; + sticks[i] = temp; + } + for(int k = max; k <= sum; k++){ + if(!(sum % k)){ + int ts[64] = {0}; + for(int i = 0; i < n; i++) ts[i] = sticks[i]; + if(do_find(ts,0,0,k,k,n) == -1){ + printf("%d\n",k); + break; + } + } + } + } + return 0; +} + +int print_s(int *stick, int n){ + for(int i = 0; i < n; i++) printf("%2d ",stick[i]); + printf("\n"); + return 0; +} + +int do_find(int *stick, int count, int idx, int tmp, int k, int n){ + count = 0; + for(int k = 0; k < n; k++) if(!~stick[k]) count++; + if(count == n){ + if(tmp == 0) return -1; + else return 0; + } + for(int i = idx ; i < n; i++){ + if(~stick[i]){ + //print_s(stick, n); + //printf("TMP:%d\n",tmp); + if(tmp - stick[i] > 0){ + int temp = stick[i], result; + stick[i] = -1; + + int ts[64] = {0}; + for(int i = 0; i < n; i++) ts[i] = stick[i]; + + result = do_find(ts, count+1, i+1, tmp-temp, k, n); + if(result == 1){ + result = do_find(ts, count+1, 0, k, k, n); + if(result == -1) return -1; + else if(result == 0) continue; + } + else if(!~result) return -1; + else{ + continue; + } + } + else if(tmp - stick[i] == 0){ + stick[i] = -1; + if(count+1 == n) return -1; + return 1; + } + } + } + return 0; +} diff --git a/96/problem.build b/96/problem.build new file mode 100644 index 0000000..d46da15 Binary files /dev/null and b/96/problem.build differ diff --git a/96/problem.build.dSYM/Contents/Info.plist b/96/problem.build.dSYM/Contents/Info.plist new file mode 100644 index 0000000..09786f1 --- /dev/null +++ b/96/problem.build.dSYM/Contents/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleIdentifier + com.apple.xcode.dsym.problem.build + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + dSYM + CFBundleSignature + ???? + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/96/problem.build.dSYM/Contents/Resources/DWARF/problem.build b/96/problem.build.dSYM/Contents/Resources/DWARF/problem.build new file mode 100644 index 0000000..af230d3 Binary files /dev/null and b/96/problem.build.dSYM/Contents/Resources/DWARF/problem.build differ diff --git a/96/problem.set b/96/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/96/stdin b/96/stdin new file mode 100644 index 0000000..3bd0c46 --- /dev/null +++ b/96/stdin @@ -0,0 +1,5 @@ +7 +5 2 1 5 2 1 1 +4 +1 2 3 4 +0 diff --git a/96/stdout b/96/stdout new file mode 100644 index 0000000..6b623fd --- /dev/null +++ b/96/stdout @@ -0,0 +1,2 @@ +17 +10 diff --git a/97/main.c b/97/main.c new file mode 100644 index 0000000..b91ce0c --- /dev/null +++ b/97/main.c @@ -0,0 +1,18 @@ +#include + +int main(void){ + int list[32] = {0}, n, idx = 0; + while(scanf("%d",&n) == 1 && ~n){ + if(n) list[idx++] = n; + else{ + int count = 0; + for(int i = 0; i < idx; i++){ + for(int j = 0; j < idx; j++) + if(list[j] == 2*list[i]) count++; + } + printf("%d\n",count); + idx = 0; + } + } + return 0; +} diff --git a/97/problem.build b/97/problem.build new file mode 100644 index 0000000..552033d Binary files /dev/null and b/97/problem.build differ diff --git a/97/problem.set b/97/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/97/stdin b/97/stdin new file mode 100644 index 0000000..fc18558 --- /dev/null +++ b/97/stdin @@ -0,0 +1,2 @@ +1 4 3 2 9 7 18 22 0 +1 4 3 2 9 7 18 6 44 88 0 diff --git a/97/stdout b/97/stdout new file mode 100644 index 0000000..7ee0007 --- /dev/null +++ b/97/stdout @@ -0,0 +1,2 @@ +3 +5 diff --git a/98/main.c b/98/main.c new file mode 100644 index 0000000..4465927 --- /dev/null +++ b/98/main.c @@ -0,0 +1,14 @@ +#include + +long f(long n){ + if(!n) return 0; + else return 1+f(n/2); +} + +int main(void){ + long n; + while(scanf("%ld",&n) && n){ + printf("%ld\n",f(n)); + } + return 0; +} diff --git a/98/problem.build b/98/problem.build new file mode 100644 index 0000000..9ccea84 Binary files /dev/null and b/98/problem.build differ diff --git a/98/problem.set b/98/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/98/stdin b/98/stdin new file mode 100644 index 0000000..82b6055 --- /dev/null +++ b/98/stdin @@ -0,0 +1,4 @@ +1 +2 +3 +0 diff --git a/98/stdout b/98/stdout new file mode 100644 index 0000000..2ca3cd5 --- /dev/null +++ b/98/stdout @@ -0,0 +1,3 @@ +1 +2 +2 diff --git a/99/main.c b/99/main.c new file mode 100644 index 0000000..8bde563 --- /dev/null +++ b/99/main.c @@ -0,0 +1,21 @@ +#include + +int a[1000005], c[1000005]; + +int main(void){ + int n; + while(scanf("%d",&n) != EOF){ + long long sum = 0; + for(int i = 0; i < n; i++){ + scanf("%d",a+i); + sum += a[i]; + } + long long avg = sum / n; + c[0] = 0; + for(int i = 1; i < n; i++){ + c[i] = c[i-1] - a[i] + avg; + } + + } + return 0; +} diff --git a/99/problem.set b/99/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/99/stdin b/99/stdin new file mode 100644 index 0000000..e69de29 diff --git a/99/stdout b/99/stdout new file mode 100644 index 0000000..e69de29 diff --git a/test/main.c b/test/main.c new file mode 100644 index 0000000..f1ab86f --- /dev/null +++ b/test/main.c @@ -0,0 +1,14 @@ +#include + +int main(void){ + int number, i; + scanf("%d",&number); + printf("%d*%d*%d=%lu=",number,number,number,(unsigned long)number*number*number); + int k = number * number - number + 1; + for(i = 0; i < number; i++,k += 2){ + if(i) printf("+"); + printf("%d",k); + } + printf("\n"); + return 0; +} diff --git a/test/problem.build b/test/problem.build new file mode 100644 index 0000000..36e064c Binary files /dev/null and b/test/problem.build differ diff --git a/test/problem.set b/test/problem.set new file mode 100644 index 0000000..e69de29 diff --git a/test/stdin b/test/stdin new file mode 100644 index 0000000..7ed6ff8 --- /dev/null +++ b/test/stdin @@ -0,0 +1 @@ +5 diff --git a/test/stdout b/test/stdout new file mode 100644 index 0000000..048651c --- /dev/null +++ b/test/stdout @@ -0,0 +1 @@ +5*5*5=125=21+23+25+27+29