All submissions for this problem are available.
Read problems statements in Mandarin Chinese, Russian and Vietnamese as well.
floor[1*e] + floor[2*e] + floor[3*e] + ... + floor[n*e],
where floor[x] is the largest integer that is not greater than x, and e is Euler's number: 2.7182818284...
A single line which contains a single integer: n.
A single line which contains a single integer which should be the answer.
Constraints1 ≤ n ≤ 104000
- Subtask #1 (50 points): 1 ≤ n ≤ 10100
- Subtask #2 (50 points): Original constraints.
Input: 3 Output: 15
floor[1*e] = floor[2.71828..] = 2. floor[2*e] = floor[5.43656..] = 5. floor[3*e] = floor[8.15484..] = 8. So the answer is 2+5+8=15.
Source code limit is 1000 bytes.
|Tags||cgy4ever, hard, june17, number-theory|
|Time Limit:||2 sec|
|Source Limit:||1000 Bytes|
|Languages:||C, CPP14, JAVA, PYTH, PYTH 3.6, PYPY, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, SCALA, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, PERL6, TEXT, SCM chicken, CLOJ, FS|
Fetching successful submissions