#include <stdio.h> int main() { int n1,n2,n3; int ans; scanf("%d %d %d", &n1, &n2, &n3); ans=(((n3*(n3+1))/2)*n1)-n2; if(ans>0) printf("%d\n",ans); else printf("%d\n", 0); return 0; }
2023-12-21 11:57:21
#include <stdio.h> int main() { int n1,n2,n3; int ans; scanf("%d %d %d", &n1, &n2, &n3); ans=(((n3*(n3+1))/2)*n1)-n2; if(ans>0) printf("%d\n",ans); else printf("%d\n", 0); return 0; }