Codeforces 584A. Olesya and Rodion Solution

 Solution in C++:

 ///La ilaha illellahu muhammadur rasulullah

///******Bismillahir-Rahmanir-Rahim******///

///AH Tonmoy

///Department of CSE,23rd batch

    ///Islamic University,Bangladesh

    1. #include <bits/stdc++.h>
    2. using namespace std;
    3. int main()
    4. {
    5. int n,t,i;
    6. cin>>n>>t;
    7. if((n==1)&&(t==10))
    8. {
    9. cout<<"-1"<<endl;
    10. return 0;
    11. }
    12. else if(t==10)
    13. {
    14. cout<<t;
    15. for(i=2; i<n; i++)
    16. cout<<"0";
    17. }
    18. else
    19. {
    20. cout<<t;
    21. for(i=2; i<=n; i++)
    22. cout<<"0";
    23. }
    24. cout<<endl;
    25. }


    No comments

    Most View Post

    Recent post

    Codeforces Round 925 (Div. 3) 1931D. Divisible Pairs Solution

        Problem Link  :   https://codeforces.com/contest/1931/problem/D S olution in C++: /// Author : AH_Tonmoy #include < bits / stdc ++. ...

    Powered by Blogger.