Participate in exhilarating programming contests, solve unique algorithm and data structure challenges and be a part of an awesome community.
The Koch snowflake can be constructed by starting with an equilateral triangle,
then recursively altering each line segment as follows:
Given the order N, of the koch snowflake, you need to find the number of peak vertices
and edges of the koch snowflake.
First line will contain T (T < 10000), the number of test cases. Each of the
T lines will contain one integer N (0 < N < 10^18).
For each case, print the number of vertices and edges for koch snowflake of
order N modulo 1000,000,007.
Input | Output |
---|---|
2 1 2 | Case 1: 3 3 Case 2: 6 12 |
68% Solution Ratio
One_ElephantEarliest,
experimenterFastest, 0.0s
oneoff.QtSOcNcx54Lightest, 393 kB
cryptoshawonShortest, 464B
Login to submit