Challenges
Leaderboards
Download
Buy
Program52
Sponsor
About
Contact
Login
Signup
[C++] Formula solution
[C++] Formula solution
🎳
A Billion Bowling Pins
Week 5, 2026
All Solutions
C++ Solutions
#include
#include
using namespace std; int main() { int n; cin >> n; int k = (sqrt(8 * n + 1) - 1) / 2; cout << k << endl; }