VM7WC '15 #4 Bronze - Melanie's Cradles

View as PDF

Submit solution

Points: 3
Time limit: 2.0s
Memory limit: 64M

Problem type
Allowed languages
Ada, Assembly, Awk, Brain****, C, C#, C++, COBOL, CommonLisp, D, Dart, F#, Forth, Fortran, Go, Groovy, Haskell, Intercal, Java, JS, Kotlin, Lisp, Lua, Nim, ObjC, OCaml, Octave, Pascal, Perl, PHP, Pike, Prolog, Python, Racket, Ruby, Rust, Scala, Scheme, Sed, Swift, TCL, Text, Turing, VB, Zig

Melanie has a circular desk and many Newton's cradles she wants to fit on it. If the center of the desk is treated as (0,0) and each Newton's cradle can only be placed on a lattice point (points with integer coordinates), what is the maximum amount of Newton's cradles that can be placed on the desk given radius R (1 \le R \le 100)?

Input Specification

A single integer, R.

Output Specification

The number of cradles that can be put on the desk.

Sample Input


Sample Output



  • -6
    bobhob314  commented on Feb. 25, 2015, 8:41 p.m.

    This comment is hidden due to too much negative feedback. Click here to view it.

    • 7
      FatalEagle  commented on Feb. 25, 2015, 8:43 p.m.

      The constraints are different.