MCPcopy Create free account
hub / github.com/Vishruth-S/CompetitiveCode / main

Function main

Codeforces_problems/buttons/solution.cpp:22–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20
21#include<stdio.h>
22int main (){
23 long long int n;
24 scanf("%lld",&n);
25 long long int sum=0;
26 int ctr=n-1;
27 int temp=0;
28 while(ctr>0){
29 for(int i=0;i<ctr;i++){
30 sum+=temp+1;
31 }
32 ctr--;
33 temp++;
34 }
35 printf("%lld\n",sum+n);
36
37 return 0;
38}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected