View Code of Problem 115

#include <stdio.h>
using namespace std;
int main(){
	int n;
	long long int sum;
	while( ~scanf("%d", &n )){
		sum = 0;
		for( int i=1; i<=n; i++ ){
			 sum += i;
	}
        printf("%lld %d\n",sum, 100000*n );
	}
	
	return 0;
	
}

Double click to view unformatted code.


Back to problem 115