http://poj.org/problem?id=2509 Peter's smokes Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 16957 Accepted: 6984 Description Peter has n cigarettes. He smokes them one by one keeping all the butts. Out of k > 1 butts he can roll a ne…
#include <iostream> #include <stdio.h> using namespace std; int main() { //freopen("acm.acm","r",stdin); int n; int k; int sum; int mod; int tem; while(cin>>n>>k) { sum = ; while(n >= k) { mod = n % k; tem =…
链接: http://poj.org/problem?id=3259 http://acm.hust.edu.cn/vjudge/contest/view.action?cid=22010#problem/B Wormholes Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 25079 Accepted: 8946 Description While exploring his many farms, Farmer…
Halloween treats Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 7644 Accepted: 2798 Special Judge Description Every year there is the same problem at Halloween: Each neighbour is only willing to give a certain total number of sweets…
Find a multiple Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 7192 Accepted: 3138 Special Judge Description The input contains N natural (i.e. positive integer) numbers ( N <= 10000 ). Each of that numbers is not greater than 15000…
The Pilots Brothers' refrigerator Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 22286 Accepted: 8603 Special Judge Description The game “The Pilots Brothers: following the stripy elephant” has a quest where a player needs to open a…
Flip Game Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 37427 Accepted: 16288 Description Flip game is played on a rectangular 4x4 field with two-sided pieces placed on each of its 16 squares. One side of each piece is white and the…