题目链接: http://codeforces.com/contest/464/problem/C J. Substitutes in Number time limit per test 1 secondmemory limit per test 256 megabytes 问题描述 Andrew and Eugene are playing a game. Initially, Andrew has string s, consisting of digits. Eugene sends A…
Over time, Alexey's mail box got littered with too many letters. Some of them are read, while others are unread. Alexey's mail program can either show a list of all letters or show the content of a single letter. As soon as the program shows the cont…
D. World of Darkraft - 2 time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Roma found a new character in the game "World of Darkraft - 2". In this game the character fights monsters, fi…
C. No to Palindromes! time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Paul hates palindromes. He assumes that string s is tolerable if each its character is one of the first p letters of th…
D. Soldier and Number Game Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/546/problem/D Description Two soldiers are playing a game. At the beginning first of them chooses a positive integer n and gives it to the second s…
D. Soldier and Number Game time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output Two soldiers are playing a game. At the beginning first of them chooses a positive integer n and gives it to the…
D. Soldier and Number Game time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output Two soldiers are playing a game. At the beginning first of them chooses a positive integer n and gives it to the…
F. Restore a Number Vasya decided to pass a very large integer n to Kate. First, he wrote that number as a string, then he appended to the right integer k — the number of digits in n. Magically, all the numbers were shuffled in arbitrary order whil…
A. Guess a number! time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output A TV show called "Guess a number!" is gathering popularity. The whole Berland, the old and the young, are watching th…
Some natural number was written on the board. Its sum of digits was not less than k. But you were distracted a bit, and someone changed this number to n, replacing some digits with others. It's known that the length of the number didn't change. You h…
D. Soldier and Number Game time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output -> Link <- 题目链接呈上: 题意:两个人玩游戏,其中一个人选一个数n给另外一个人,然后每轮选一个数x使得n能被x整除,然后用n/=x;注意x>1:问要使得另一个人得分最高,最高多少:即最多能够玩几轮n变成了1…
[链接] 我是链接,点我呀:) [题意] 在这里输入题意 [题解] 直接暴力求出第k个perfect数字就好. 纯模拟. [代码] #include <bits/stdc++.h> #define double long double using namespace std; int n; int _judge(int x){ int num = 0; while (x){ num+=x%10; x/=10; } return num==10; } int main(){ #ifdef LOC…
B. Split a Number time limit per test2 seconds memory limit per test512 megabytes inputstandard input outputstandard output Dima worked all day and wrote down on a long paper strip his favorite number n consisting of l digits. Unfortunately, the stri…
Split a Number time limit per test 2 seconds memory limit per test 512 megabytes input standard input output standard output Dima worked all day and wrote down on a long paper strip his favorite number nn consisting of ll digits. Unfortunately, the s…
Codeforces Round #366 (Div. 2) A I hate that I love that I hate it水题 #I hate that I love that I hate it n = int(raw_input()) s = "" a = ["I hate that ","I love that ", "I hate it","I love it"] for i in ran…
Codeforces Round #354 (Div. 2) Problems # Name A Nicholas and Permutation standard input/output 1 s, 256 MB x3384 B Pyramid of Glasses standard input/output 1 s, 256 MB x1462 C Vasya and String standard input/output 1 s, 256 MB x1393…