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
-
Find the sum of all the numbers of the input vector
49142 Solvers
-
5905 Solvers
-
Project Euler: Problem 7, Nth prime
1428 Solvers
-
Make an awesome ramp for a tiny motorcycle stuntman
653 Solvers
-
Matrix indexing with two vectors of indices
722 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!