Created
August 20, 2019 00:51
-
-
Save luciocf/3c42c53aafed19130a7696f77032db19 to your computer and use it in GitHub Desktop.
Comentário Noic OBI 2019 - Fase 1 - Programação Nível 1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Comentário Noic OBI 2019 - Fase 1 - Programação Nível 1 | |
// Jogo de Dominós | |
#include <bits/stdc++.h> | |
using namespace std; | |
int main(void) | |
{ | |
int n; | |
cin >> n; | |
// 1 + 2 + ... + (N+1) | |
cout << ((n+1)*(n+2))/2 << "\n"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment