【Codeforces Round 324 (Div 2)A】【水题】Olesya and Rodion 构造数长度为n且是t的倍数
来源:互联网 发布:割接通知 编辑:程序博客网 时间:2024/05/29 05:04
#include<stdio.h>#include<string.h>#include<ctype.h>#include<math.h>#include<iostream>#include<string>#include<set>#include<map>#include<vector>#include<queue>#include<bitset>#include<algorithm>#include<time.h>using namespace std;void fre(){freopen("c://test//input.in","r",stdin);freopen("c://test//output.out","w",stdout);}#define MS(x,y) memset(x,y,sizeof(x))#define MC(x,y) memcpy(x,y,sizeof(x))#define MP(x,y) make_pair(x,y)#define ls o<<1#define rs o<<1|1typedef long long LL;typedef unsigned long long UL;typedef unsigned int UI;template <class T1,class T2>inline void gmax(T1 &a,T2 b){if(b>a)a=b;}template <class T1,class T2>inline void gmin(T1 &a,T2 b){if(b<a)a=b;}const int N=0,M=0,Z=1e9+7,ms63=1061109567;int casenum,casei;int main(){int n,t;while(~scanf("%d%d",&n,&t)){if(t<10){printf("%d",t);for(int i=2;i<=n;i++)printf("0");puts("");}else{if(n==1)puts("-1");else{printf("%d",t);for(int i=3;i<=n;i++)printf("0");puts("");}}}return 0;}/*【题意】让你构造一个数。长度为n(1<=n<=100),且这个数是t(2<=t<=10)的倍数。【类型】水题【分析】因为t只有两种情况——1,t<10,即t为个位数。这个时候我们直接在后面添0即可。2,t=10,这个时候当n=1时非法,否则还是在后面添0即可。*/
1 0
- 【Codeforces Round 324 (Div 2)A】【水题】Olesya and Rodion 构造数长度为n且是t的倍数
- Codeforces Round #324 (Div. 2) A. Olesya and Rodion
- Codeforces Round #324 (Div. 2) 584A. Olesya and Rodion
- Codeforces Round #324 (Div. 2)A. Olesya and Rodion
- Codeforces Round #324 (Div. 2) A. Olesya and Rodion
- Codeforces Round #324 (Div. 2) A. Olesya and Rodion 构造数字 思维题
- Codeforces Round #324 A Olesya and Rodion
- Codeforces 584 A. Olesya and Rodion(Codeforces Round #324 (Div. 2))
- Codeforces 584A Olesya and Rodion 【构造】
- cf#324 Div.2 Problem A Olesya and Rodion
- cf#324-A. Olesya and Rodion-水题
- Codeforces--584A--Olesya and Rodion(水题)
- Codeforces Olesya and Rodion
- A. Olesya and Rodion
- Codeforces 584 A. Olesya and Rodion 数论+找规律(构造)
- CodeForces - 584A Olesya and Rodion (模拟)水
- codeforces——584A——Olesya and Rodion
- 【Codeforces Round 272 (Div 2)A】【贪心 暴力 水题】Dreamoon and Stairs n个台阶每次走一步或两步是否有步数恰好为m倍数
- idea 自动生成get set方法
- 软工视频总结
- UILabel
- Java中LinkedHashMap的实现
- hdu 3264 Open-air shopping malls(几何)
- 【Codeforces Round 324 (Div 2)A】【水题】Olesya and Rodion 构造数长度为n且是t的倍数
- git 将自己本地的代码建立分支推送到远程仓库
- VC中调用dll类的方法
- iOS学习XMPP之电子名片模块
- 谈Dubbo服务框架(顶)
- OpenGL_Qt学习笔记之_01(创建一个OpenGL窗口)
- gulp
- JAVA排序汇总
- HDU 1870 愚人节的礼物