.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