Olesya loves numbers consisting of n digits, and Rodion only likes numbers that are divisible by t. Find some number that satisfies both of them. Your task is: given the n and t print an integer strictly larger than zero consisting of n digits that i…
A. Olesya and Rodion Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/584/problem/A Description Olesya loves numbers consisting of n digits, and Rodion only likes numbers that are divisible by t. Find some number that satisfi…
Olesya loves numbers consisting of n digits, and Rodion only likes numbers that are divisible by t. Find some number that satisfies both of them. Your task is: given the n and t print an integer strictly larger than zero consisting of n digits that i…
---恢复内容开始--- Codeforces Round #324 (Div. 2) Problem A 题目大意:给二个数n.t,求一个n位数能够被t整除,存在多组解时输出任意一组,不存在时输出“-1”. 数据范围: 1 ≤ n ≤ 100, 2 ≤ t ≤ 10 so easy!首先考虑无解的时候,只有当n==1,t==10是无解,其他情况都存在解.很容易想到最简单的n位数能被t整除的数是,t个n组成的数. 参考代码: By Royecode, contest: Codeforces Ro…
A. Olesya and Rodion time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Olesya loves numbers consisting of n digits, and Rodion only likes numbers that are divisible by t. Find some number tha…
CF的rating设置改了..人太多了,决定开小号打,果然是明智的选择! 水 A - Olesya and Rodion #include <bits/stdc++.h> using namespace std; typedef long long ll; const int N = 1e5 + 10; const int INF = 0x3f3f3f3f; int main(void) { int n, t; scanf ("%d%d", &n, &t);…
Bahosain is walking in a street of N blocks. Each block is either empty or has one lamp. If there is a lamp in a block, it will light it’s block and the direct adjacent blocks. For example, if there is a lamp at block 3, it will light the blocks 2, 3…