题目: 题意:输入n和k,找到一个最小的数,满足末尾有至少k个0和是n的倍数. 最小的情况 ans = n,最大的情况 ans = n*pow(10,k). 令 k = pow(10,k); 我们发现所有可能的情况就是 ans = n*(k的因子). 把k的因子从小到大遍历一遍就可以了. 代码: #include <bits\stdc++.h> using namespace std; typedef long long ll; int main() { ll n,k; cin >>…
A. k-rounding time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output For a given positive integer n denote its k-rounding as the minimum positive integer x, such that x ends with k or more zeros i…
http://codeforces.com/contest/738/problem/D Galya is playing one-dimensional Sea Battle on a 1 × n grid. In this game a ships are placed on the grid. Each of the ships consists of bconsecutive cells. No cell can be part of two ships, however, the shi…
http://codeforces.com/contest/738/problem/C Vasya is currently at a car rental service, and he wants to reach cinema. The film he has bought a ticket for starts in t minutes. There is a straight road of length s from the service to the cinema. Let's…
http://codeforces.com/contest/738/problem/A Polycarp has interviewed Oleg and has written the interview down without punctuation marks and spaces to save time. Thus, the interview is now a string s consisting of n lowercase English letters. There is…