PowerShell, 31 bytes
"$args"-in(1..10e5|%{($s+=$_)})
Nice and slow brute force method. Make an array of every of every sum of 1 through 106, and see if the argument is in there.
briantist
- 3.3k
- 16
- 21
Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack Exchange"$args"-in(1..10e5|%{($s+=$_)})
Nice and slow brute force method. Make an array of every of every sum of 1 through 106, and see if the argument is in there.