Skip to content

Instantly share code, notes, and snippets.

@luciocf
Created August 20, 2019 00:51
Show Gist options
  • Save luciocf/3c42c53aafed19130a7696f77032db19 to your computer and use it in GitHub Desktop.
Save luciocf/3c42c53aafed19130a7696f77032db19 to your computer and use it in GitHub Desktop.
Comentário Noic OBI 2019 - Fase 1 - Programação Nível 1
// 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