# Ruby, 14

Function

    ->n{rand(n)<1}


Program is slightly longer

    p rand(gets.to_i)<1