<title>2015 Blue Bridge Cup: 6. Addition variable multiplication</title> 2015 Blue Bridge Cup: 6. Addition variable multiplication
17 points written.
We all know: 1+2+3+ ... + 49 = 1225
You are now asked to turn two of these nonadjacent plus signs into multiplication sign, making the result 2015
Like what:
1+2+3+...+10*11+12+...+27*28+29+...+49 = 2015
Is the answer that meets the requirements.
Please look for another possible answer and submit the number to the left of the front multiplication sign (for example, commit 10).
int Main(void) {int a[50];int b[50]; for(int I= 1; I <= 49; i++) {A[i] = i; } for(int I= 1; I <= 48; i++) {B[i] = a[i]*a[i+1]-a[i]-a[i+1]; } for(int I= 1; I <= 48; i++) { for(int J= i+2; J <= 48; J + +) {if(B[i]+b[j] = = 790) {printf ("%d,%d%d%d\n", I, J, B[i], b[j]); } } }return0;}
2015 Blue Bridge Cup: 6. Addition variable multiplication