HDU 2401.Baskets of Gold Coins
2017-12-07 21:56
330 查看
题目:http://acm.hdu.edu.cn/showproblem.php?pid=2401
AC代码(C++):
总结: 水题.
AC代码(C++):
#include <iostream> #include <algorithm> #include <stdio.h> #include <vector> #include <queue> #include <map> #include <math.h> #include <string> #include <string.h> #include <bitset> #define INF 0xfffffff #define MAXN 100105 using namespace std; int n,w,d,x; int main(){ while(scanf("%d%d%d%d",&n,&w,&d,&x)!=EOF){ int y = (n-1)*n*w/2-x; if(y==0)cout<<n<<endl; else cout<<y/d<<endl; } }
总结: 水题.
相关文章推荐
- HDOJ(HDU) 2401 Baskets of Gold Coins(数列、)
- HDOJ(HDU) 2401 Baskets of Gold Coins(数列、)
- HDU 2401 Baskets of Gold Coins
- HDU 2401 Baskets of Gold Coins
- HDU 2401:Baskets of Gold Coins
- hdu 2401 Baskets of Gold Coins
- HDU-2401-Baskets of Gold Coins
- hdu 2401 Baskets of Gold Coins
- hdu 2401 Baskets of Gold Coins
- HDU 2401 Baskets of Gold Coins
- hdoj 2401 Baskets of Gold Coins
- HDOJ 2401 Baskets of Gold Coins
- 杭电acm- 2401 Baskets of Gold Coins
- HDOJ 2401 Baskets of Gold Coins (数学题)
- Baskets of Gold Coins 2401
- Baskets of Gold Coins
- hdu2401 Baskets of Gold Coins
- 杭电2410Baskets_Of_Gold_Coins
- Baskets of Gold Coins
- hust 1170 - Baskets of Gold Coins