HDU 2089 is not 62

Source: Internet
Author: User

Simple problem: Find out unlucky license plates and store them in an array;

Pay attention to 64-64 output 1;

63 64 output is also 1;

Because there are only 1000000 tables, you can directly create tables.

# Include <stdio. h> # include <string. h> int s [1000001]; int main () {int I, j, A, B, E, F, C; s [0] = 0; for (I = 1; I <1000001; I ++) {B = I; for (j = 1; j <7; j ++) {A = B % 10; C = B % 100; B = B/10; if (a = 4 | C = 62) {s [I] = s [I-1] + 1; break;} elses [I] = s [I-1];} while (scanf ("% d", & E, & F )) {If (E = 0 & F = 0) break; If (E = f) {If (s [e]-s [E-1]! = 0) printf ("1 \ n"); elseprintf ("0 \ n");} else printf ("% d \ n ", f-s [f] + s [E-1] + 1-e);} return 0 ;}


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.