2015 Blue Bridge Cup: 1. Number of Lotteries

Source: Internet
Author: User

<title>2015 Blue Bridge Cup: 1. Number of Lotteries</title> 2015 Blue Bridge Cup: 1. Number of Lotteries

Some people are superstitious figures, such as the number with "4", Think and "dead" homophonic, feel unlucky.
Although these statements are nonsense, they sometimes have to cater to the needs of the public. The lottery number for a sweepstakes is 5 digits (10000-99999), which requires that no number with "4" be present, and the organizer asks you to calculate how many tickets can be issued if any two tickets are not re-numbered.
Please submit this number (an integer), do not write any superfluous content or descriptive text.

3 points to kneel, when submitted to write is 4 of the number ....
52488
int Main(void) {int ans= 0; for(int I= 1; I <= 9; i++) { for(int J= 0; J <= 9; J + +) { for(int k= 0; K < 10; k++) { for(int x= 0; x < 10; X + +) { for(int y= 0; Y < 10; y++) {if(i = = 4 | | j = 4 | | k = = 4 | | x = = 4 | | y = = 4) {Continue;                    } ans++; }}}}} printf ("%d\n", ans);return0;}

2015 Blue Bridge Cup: 1. Number of Lotteries

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.