troyoTriangulo

Zaid · November 19, 2020 · C++
#include <iostream>
using namespace std;

int main(int argc, char *argv[]) {
	
	long int n;
	
	int64_t k;
	
	cin>>n;
	
	k = n*(n+1)/2;
	
	cout<<k<<endl;
	
	return 0;
}

Comments

Please sign up or log in to contribute to the discussion.