Editorial for Огледални Кодове


Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.

Submitting an official solution before solving the problem yourself is a bannable offence.
by: maya

Тестовете можете да видите тук.

Примерно решение на C++:

#include <iostream>
using namespace std;

int main()
{
    int a,b;
    cin>>a>>b;
    int e,d,s;
    e=a%10;
    d=a/10%10;
    s=a/100;

    int ob1=e*100+d*10+s;
    int e1,d1,s1;
    e1=b%10;
    d1=b/10%10;
    s1=b/100;
    int ob2=e1*100+d1*10+s1;

    if( ob1>ob2) 
      cout<<ob1<<endl;
    else 
      cout<<ob2<<endl;

    return 0;
}

Comments

There are no comments at the moment.