2015 Blue Bridge Cup: 6. Addition variable multiplication

Source: Internet
Author: User

<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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.