Codeforces 584A Olesya and Rodion

/*
    Codeforces 584A Olesya and Rodion
    Verdict:: Accepted
*/
#include <bits/stdc++.h>
#define nl puts("")
using namespace std;

int main()
{
    int n,t;
    while (cin >> n >> t)
    {
        if (n==1 and t==10)
        {
            cout << "-1" << endl;
            continue;
        }

        if (t!=10)
        {
            cout << t;
            for (int i=0;i<n-1;i++)
                cout << "0";
        }

        else
        {
            cout <<"1";
            for (int i=0;i<n-1;i++)
                cout << "0";
        }

        nl;
    }

    return 0;
}

Comments

Popular posts from this blog

Uva 10650 - Determinate Prime

SPOJ-CMG - Collecting Mango

LeetCode Palindrome Number