Open Rohyoohyun opened 1 month ago
#include <stdio.h> int main(){ int c, k, p; scanf("%d %d %d", &c, &k, &p); int answer=0; for(int i=0; i<=c; i++) answer += (k*i) + p*(i*i); printf("%d", answer); return 0; }