Problem 1730. GJam: 2013 Rd1a Bullseye Painting
Google Code Jam 2013 Round 1a Bullseye challenge is to determine how many full rings can be painted given an initial radius and an amount of paint.
Given a radius r, central white zone, create black rings of width 1 cm separated by 1 cm given P ml of paint that covers pi sq-cm per ml of paint provided.
Input: [r, p] Integer values, 1<=r,P<=1000. Always enough P for one ring
Output: Rings
Examples:
[1 9] 1; [1 10] 2; [3 40] 3;
[1 1000000000000000000] 707106780 for Bullseye Large Number Challenge
Google Code Jam:
The next competition starts in April 2014. See details from above link.
This contest does not discriminate by age or against the superiority of Matlab, unlike ACM. Forty-seven Matlab contestants in GJam 2013 out of 21,273.
Solutions to the various past Challenges in Matlab can be found via GJam Solutions.
The Challenges have subsets with Large Number aspects which appear to favor C and Java. Binbin Qi is our last hope with his expertise in Matlab/Java BigInteger.
Related Challenges:
1) Reading 64 bit input file 2) Bullseye Large Numbers r<1E18, P<2E18
Usage of regexp is verboten
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers26
Suggested Problems
-
152 Solvers
-
Back to basics 12 - Input Arguments
594 Solvers
-
302 Solvers
-
Given a matrix, swap the 2nd & 3rd columns
1051 Solvers
-
Matrix rotation as per given angle
113 Solvers
More from this Author308
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!