BERNULLI - Bernoulli numbers

Your task is to compute natural logarithm of the absolute value of the Bernoulli number for many integer parameters N.

I/O format is the same as in BINARYIO.


Array of unsigned 32 bit integers in binary format (use fread in C/C++)

To read unsigned N use fread(&N, sizeof(N), 1, stdin)  instead of usual scanf("%u", &N) until the end of file.

For each test case 2 ≤ N < 232, N is even. There will be up to 1,250,000 numbers in input file.


Array of doubles in binary format (use fwrite in C/C++)

To write double a use fwrite(&a, sizeof(a), 1, stdout)  instead of usual printf("%lf\n", a).

For each N output ln(|BN|) with absolute or relative error less than 10-15










Sample input and output are readable for your convenience!!!

TL = 5 * My time

hide comments
Francky: 2017-02-14 20:14:57

judge =>
I think this is visible only by psetter. You can add a comment at the end of this thread, like some did.
thread =>
Some infos here : That, and the sample judges should be enough. Tell me. You can have a look too at other built'in judges.

Last edit: 2017-02-15 06:49:19

Added by:Michael Kharitonov
Time limit:0.200s
Source limit:10000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:C-CLANG C CPP C++ 4.3.2 CPP14-CLANG CPP14 C99