"Blue Bridge Cup" sixth national game C language Group B 1. Points of Mystery (water problem)

Source: Internet
Author: User

Xiao Ming opened an online shop to sell wind chimes. A total of 3 brands: A,b,c.
For promotion, each item will be returned to a fixed point.

Xiaoming received three orders on the first day of his opening:
First Stroke: 3 A + 7 B + 1 C, total rebate: 315
Second Pen: 4 A + 10 B + 1 C, total rebate: 420
Third: A + B + C, Total return points ....

Can you calculate the number of points to be returned for the third order?

Please submit this integer, do not fill in any superfluous content.

Direct violence

1#include <cstdio>2 3 using namespacestd;4 5 intMain ()6 {7     inti,j,k;8      for(i =1; I <= -; i++)9     {Ten          for(j =1; J <= -; j + +) One         { A              for(k =1; K <= -; k++) -             { -                 if(3*i+7*j+1*k = =315&&4*i+Ten*j+1*k = =420) the                 { -printf"i =%d J =%d k =%d\n", i,j,k); -printf"i+j+k =%d\n", i+j+k); -                 } +             } -         } +     } A     return 0; at}

"Blue Bridge Cup" sixth session C language Group B 1. Points Puzzle (water)

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.