Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* e156 - 4 */
- /* AC (2ms, 112KB) */
- #include <cstdio>
- using namespace std;
- int n, ans = 0;
- bool Sum_Solution()
- {
- return (ans += n--) && n && Sum_Solution();
- }
- int main()
- {
- scanf("%d", &n);
- Sum_Solution();
- printf("%d", ans);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement