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 is divisible by t. If such number doesn't exist, print - 1.

Input

The single line contains two numbers, n and t (1 ≤ n ≤ 100, 2 ≤ t ≤ 10) — the length of the number and the number it should be divisible by.

Output

Print one such positive number without leading zeroes, — the answer to the problem, or  - 1, if such number doesn't exist. If there are multiple possible answers, you are allowed to print any of them.

Examples
input
3 2
output
712
 #include <iostream>
#include <stdio.h>
#include <algorithm>
#include <cstring>
#include <sstream>
using namespace std;
const int maxn = 1e9+;
#define N 10005
int main()
{
int n,t,i;
scanf("%d %d", &n, &t);
if(n==&&t==){
printf("-1\n");
}
else{
if(t==){
t=;
}
printf("%d",t);
for(i=;i<n-; i++) {
printf("");
}
printf("\n");
}
return ;
}

Codeforce 584A - Olesya and Rodion的更多相关文章

  1. Codeforces Round #324 (Div. 2) A. Olesya and Rodion 水题

    A. Olesya and Rodion Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/584/p ...

  2. Olesya and Rodion (思维)

    Olesya loves numbers consisting of n digits, and Rodion only likes numbers that are divisible by t. ...

  3. Codeforces Round #324 (Div. 2) Olesya and Rodion 构造

    原题链接:http://codeforces.com/contest/584/problem/A 题意: 给你n和t,让你构造一个长度为n的数,并且被t整除 题解: 方法很多,可以乱构造.....不过 ...

  4. Codeforces Round #324 (Div. 2)解题报告

    ---恢复内容开始--- Codeforces Round #324 (Div. 2) Problem A 题目大意:给二个数n.t,求一个n位数能够被t整除,存在多组解时输出任意一组,不存在时输出“ ...

  5. Codeforces 584 - A/B/C/D/E - (Done)

    链接:https://codeforces.com/contest/584 A - Olesya and Rodion - [水] 题解:注意到 $t$ 的范围是 $[2,10]$,对于位数小于 $2 ...

  6. Codeforces Round #324 (Div. 2) A

    A. Olesya and Rodion time limit per test 1 second memory limit per test 256 megabytes input standard ...

  7. Codeforces Round #324 (Div. 2)

    CF的rating设置改了..人太多了,决定开小号打,果然是明智的选择! 水 A - Olesya and Rodion #include <bits/stdc++.h> using na ...

  8. Codeforce - Street Lamps

    Bahosain is walking in a street of N blocks. Each block is either empty or has one lamp. If there is ...

  9. Codeforce Round #216 Div2

    e,还是写一下这次的codeforce吧...庆祝这个月的开始,看自己有能,b到什么样! cf的第二题,脑抽的交了错两次后过了pretest然后system的挂了..脑子里还有自己要挂的感觉,果然回头 ...

随机推荐

  1. 来去学习之---KMP算法--next计算过程

    一.概述 KMP算法是一种字符串匹配算法,比如现有字符串 T:ABCDABCDABCDCABCDABCDE, P:ABCDABCDE P字符串对应的next值:[0,0,0,0,1,2,3,4,0] ...

  2. 随着页面滚动,数字自动增大的jquery特效

    首先为了截出gif图,我下载了一个小工具 GifCam: https://www.appinn.com/gifcam/ 随着页面滚动,数字自动增大的jquery特效 主要就是依赖这个脚本script. ...

  3. opencv —— approxPolyDP 生成逼近曲线

    生成逼近曲线:approxPolyDP 函数 该函数采用 Douglas-Peucker 算法(也称迭代终点拟合算法).可以有效减少多边形曲线上点的数量,生成逼近曲线,简化后继操作. 经典的 Doug ...

  4. 【已解决】pyinstaller UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0xce in position 110: invalid continuation byte

    转载自勤奋的小青蛙本文链接地址: [已解决]pyinstaller UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0xce in positi ...

  5. 不用循环游标,一句update代码实现滚动计算

    发现一段经典SQL,不用循环游标,一句update代码实现滚动计算结存.为方便理解,结合实例测试之 --1,源数据#t1,jcshl初值为每个sid的当前库存数量,要实现的效果:每个sid的后一结存数 ...

  6. centos yum 安装jdk1.7

    安装: yum -y install java-1.7.0-openjdk-devel.x86_64 环境变量: vi /etc/profile export JAVA_HOME=/usr/lib/j ...

  7. 浏览器对象模型“BOM”-- window对象

    global对象 全局对象 所有的全局变量和全局方法,都可以归在window上 <!DOCTYPE html> <html lang="en"> <h ...

  8. CSS 如何实现当鼠标放在上面时整行变色呢?

    摘要:下文讲述css中实现鼠标放在指定行上面时,整行变色的方法分享,如下所示: 实现思路:使用:hover伪类,实现当鼠标指向时,其背景色发生相应的变化,如下例所示: 例: 下文中的div,当鼠标放上 ...

  9. linux--工具参考篇

    linux下的好用工具 工具好多!!! gdb调试利器 ldd查看程序依赖库 lsof一切皆文件 ps进程查看器 pstack 跟踪进程栈 strace 跟踪进程中的系统调用 ipcs 查询进程间通信 ...

  10. 浅谈python的第三方库——pandas(二)

    pandas使用小贴士 1 通过Series创建DataFrame 在pandas系列的第一篇博文中曾提到,Series可视为DataFrame的一种特例,即只有一列数据.既然如此,是否可以并列多个S ...