← All problemsSign in

Euler Sum

CodeChefRating 2721Open on judge ↗

Compute: 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... Input A single line which contains a single integer: n. Output A single line which contains a single integer which should be the answer. Constraints 1 ≤ n ≤ 104000 Subtasks - Subtask #1 (50 points): 1 ≤ n ≤ 10100 - Su

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start