Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Maybe it's just having participated in too many programming contests in college, but when I saw this:

Given that Pi can be estimated using the function [...], write a function that calculates Pi to an accuracy of 5 decimal places.

...my first inclination was:

    public double answer() {
        return 3.14159;
    }
It passes the stated requirements.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: