X - Vasya and Socks】的更多相关文章

A. Vasya and Socks time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Vasya has n pairs of socks. In the morning of each day Vasya has to put on a pair of socks before he goes to school. When…
A. Vasya and Socks time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Vasya has n pairs of socks. In the morning of each day Vasya has to put on a pair of socks before he goes to school. When…
A - Vasya and Socks Time Limit:1000MS     Memory Limit:262144KB     64bit IO Format:%I64d & %I64u Submit Status Practice CodeForces 460A Description Vasya has n pairs of socks. In the morning of each day Vasya has to put on a pair of socks before he…
题目链接:http://codeforces.com/contest/460/problem/A A. Vasya and Socks time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Vasya has n pairs of socks. In the morning of each day Vasya has to put o…
Problem description Vasya has n pairs of socks. In the morning of each day Vasya has to put on a pair of socks before he goes to school. When he comes home in the evening, Vasya takes off the used socks and throws them away. Every m-th day (at days w…
题目链接:http://www.codeforces.com/problemset/problem/460/A题意:Vasya每天用掉一双袜子,她妈妈每m天给他送一双袜子,Vasya一开始有n双袜子,请问第几天的时候Vasya会没有袜子穿?C++代码: #include <iostream> using namespace std; int n, m; int main() { cin >> n >> m; ; while (n) { d ++; if (n) n --…
题目链接:http://codeforces.com/problemset/problem/460/A 题目意思:有一个人有 n 对袜子,每天早上会穿一对,然后当天的晚上就会扔掉,不过他会在 m 的倍数所代表的天数(1m,2m,3m...)会购入一双袜子,不过是在那一天的晚上买.问他拥有的袜子够他穿几天. 首先他是晚上扔掉,早上穿,晚上买这些信息是无关紧要的,好像不影响解题,不要太纠结......这题最关键的是,他穿完 他本来购入的 n 对袜子后,又再购入的情况,因为假设他在前 n 日(也就是m…
题目链接 A. Vasya and Socks time limit per test:2 secondsmemory limit per test:256 megabytesinput:standard inputoutput:standard output Vasya has n pairs of socks. In the morning of each day Vasya has to put on a pair of socks before he goes to school. Wh…
之所以在codeforces上找这100道水题的原因是为了巩固我对最近学的编程语言的掌握程度. 找的方式在codeforces上的PROBLEMSET中过的题最多的那些题里面出现的最前面的10个题型,它们是: math(数学) brute force(暴力) strings(字符串) implementation(模拟) greedy(贪心) sortings(排序) number theory(数论) constructive algorithm dp(动态规划) shortest path(…
详见:http://robotcator.logdown.com/posts/221514-codeforces-round-262-div-2 1:A. Vasya and Socks   http://codeforces.com/contest/460/problem/A 有n双袜子,每天穿一双然后扔掉.每隔m天买一双新袜子,问最多少天后没有袜子穿. . 简单思维题:曾经不注重这方面的训练,结果做了比較久.这样的题自己边模拟边想.只是要多考虑trick ```c++ int main(){…