December 22, 2018
Average prime numbers less than k
Threads: Enter an integer k, Calculate and print out the average of the prime numbers less than or equal to k.
Input: An integer k.
Output: A unique number is the average of the prime numbers less than or equal to k. Results rounded to 3 decimal.
For example:
input: 5 output: 3.333
You are not logged in? Log in to Submit Now!
4 Comments
Add a Comment
You must be logged in to post a comment.
góp ý:
Trong trường hợp k <2
Lời giải của ad sẽ bị sai.
thân,
Thank you.
lỗi submit nữa rồi ad ơi
Currently the number of submissions per day is limited 100 test. So maybe you run out of turns.