- #include<stdio.h>
- int main()
- {
- int i,a,c;
- long int b,x=0;
- scanf("%d%ld%d",&a,&b,&c);
- for (i=1;i<=c;i++)
- {
- x=x+i*a;
- }
- if (x>b) printf("%ld\n",x-b);
- else printf("0\n");
- return 0;
- }
Subscribe to:
Post Comments (Atom)
Codeforces 131A cAPS lOCK Solution in C
#include <stdio.h> int main () { char ch [ 106 ]; int i , j , ck = 1 ; scanf ( "%s" , ch ); ...
-
#include <stdio.h> #include <string.h> int main () { int i , n , l = 0 ; char a [ 120 ]; scanf ( ...
-
#include <stdio.h> int main () { int o , n , a , b , c , s , t , u ; s = 0 ; t = 0 ; u = 0 ...
-
#include <stdio.h> #include <string.h> int main () { int i , n , p = 0 ; char s [ 120 ]; scanf ( ...
No comments:
Post a Comment