Sum of an Arithmetic Progression
Print the sum of the first n terms of an arithmetic progression with first term a and common difference d.
Constraints
1 <= n <= 10^9 |a|, |d| <= 10^9
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.