#include<cstdio> using namespace std; int T=0; long long h,a,b,k; int main() { freopen("bzoj3856.in","r",stdin); while(1) { scanf("%lld%lld%lld%lld",&h,&a,&b,&k); if (!h&&!a&&!b&&…
题目描述 你要打一只h点血的怪物,每回合你攻击会造成a点伤害,回合结束后怪物会回b点血,你每攻击k回合需要休息一次,该回合不能造成伤害.怪物血量降到0以下就会死亡,问最后能否打死怪物. 输入 There are multiple test cases, terminated by a line "0 0 0 0". For each test case, the first line contains four integers h,a,b,k(1<=h,a,b,k <=1…
4950 Monster Monster Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 52 Accepted Submission(s): 29 Problem Description Teacher Mai has a kingdom. A monster has invaded this kingdom, and Teacher Mai…
题目链接: A. Fight the Monster time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output A monster is attacking the Cyberland! Master Yang, a braver, is going to beat the monster. Yang and the monster ea…
Monster 题目链接: http://acm.hust.edu.cn/vjudge/contest/123554#problem/I Description Teacher Mai has a kingdom. A monster has invaded this kingdom, and Teacher Mai wants to kill it. Monster initially has h HP. And it will die if HP is less than 1. Teache…
A. Fight the Monster Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/487/problem/A Description A monster is attacking the Cyberland! Master Yang, a braver, is going to beat the monster. Yang and the monster each have 3 attr…
B. The Monster and the Squirrel Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/592/problem/B Description Ari the monster always wakes up very early with the first ray of the sun and the first thing she does is feeding her…