2016 provincial warming 2016

Source: Internet
Author: User

.Time limit:2000MS Memory Limit:65536KB 64bit IO Format:%lld &%llu< /c8>

Description

In mathematics, a polygonal number was a number represented as dots or pebbles arranged in the shape of a Regula R Polygon. The dots is thought of as alphas (units). These is one type of 2-dimensional figurate numbers. The following picture shows how triangular numbers, square numbers, pentagonal numbers and hexagonal numbers represented a s dots arranged in the shape of corresponding regular polygon.

Also a triangular and hexagonal year. If You is patient enough, you can count the number of the "the dots in the" the left triangle or in the right hexagon in the follow ing picture. The number of dots in each shape is 2016.

Therefore, was a triangular-hexagonal-leap year. The previous triangular-hexagonal-leap year are 1540 and the next is 2556. So living to see are very rare experience.

You are to list the Triangular-hexagonal-leap years from 990528. 990528 is also a triangular-hexagonal-leap year.

Input

This problem has no input.

Output

Please print the triangular-hexagonal-leap year in increasing order.

For example, if is asked to list of the Triangular-hexagonal-leap years from 780 to 2556, the output should is:

7801128154020162556
Sample Output
20162556  <--Some lines is skipped990528
Simple test Instructions:
The output is from 2016 to 990528 qualifying years, the condition of which is: a leap year, a triangular shape, a hexagon, a point
Thinking Analysis:
Thought is not difficult to think, first Judge leap year, in judging the three-side shape, hexagon ...

#include <iostream>#include<stdio.h>using namespacestd;intMain () {Doubleb;  while(SCANF ("%LF%LF", &a,&b)! =EOF) printf ("%f%f\n",2*a*b, (4*A*A*B*B)/(a*a+b*b)); return 0;}



2016 provincial warming 2016

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.