2-101 => 1,102-201 => 2,202-301 => 3. how to solve this problem

Source: Internet
Author: User
2-101 & gt; 1,102-201 & gt; 2,202-301 & gt; 3... 2, 3, 4 ...... 101 generate, 4 ...... 201 generate, 4 ...... 201 generate 3302,3, 4 ...... 301 generate listen 2, 3, 4 ...... 401 generate 5 ------ solution --------------- 2-101 ==> 1,102-201 ==> 2,202-301 ==> 3...
2, 3, 4... 101 = generate 1
201, 4... = generate 2
201 = generate 3
301 = generate 4
401 = generate 5

------ Solution --------------------
101, 4... = generate 1 //
N02, 3, 4... n01 = generate n + 1

------ Solution --------------------
$ N = 2;
Echo ceil ($ n-1)/100 );

You can verify it by yourself.

For ($ n = 2; $ n <2002; $ n ++)
Echo $ n, ':', ceil ($ n-1)/100), PHP_EOL;

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.