标签:
Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 1862 Accepted Submission(s): 1108
#include<stdio.h> #include<string.h> int main(){ int n,w,d,sum; while(~scanf("%d%d%d%d",&n,&w,&d,&sum)){ int x=w*((n-1+1)*(n-1)/2)-sum; if(x==0)printf("%d\n",n); else printf("%d\n",x/d); } return 0; }
标签:
原文地址:http://www.cnblogs.com/handsomecui/p/4803185.html