A. Grandma Laura and Apples 题目连接: http://www.codeforces.com/contest/632/problem/A Description Grandma Laura came to the market to sell some apples. During the day she sold all the apples she had. But grandma is old, so she forgot how many apples she…
A. Grandma Laura and Apples time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Grandma Laura came to the market to sell some apples. During the day she sold all the apples she had. But grandma…
题目大意:有$n$个顾客买苹果,每个买一半的苹果,有时会送半个苹果.最后卖光了,问卖了多少钱 题解:倒退过来,可以把半个苹果当做一份来算,这样不会有小数 卡点:无 C++ Code: #include <cstdio> #include <cstring> int n, p; long long ans, now; char ch[50][50]; int main() { scanf("%d%d", &n, &p); p /= 2; for (…
E. Jzzhu and Apples time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Jzzhu has picked n apples from his big apple tree. All the apples are numbered from 1 to n. Now he wants to sell them to…
Ballot Analyzing Device 题目连接: http://codeforces.com/gym/100269/attachments Description Election committee of Flatland is preparing for presidential elections. To minimize human factor in ballot counting they decided to develop an automated Ballot Ana…