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.

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

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

#include <iostream>
using namespace std;
int main ()
    int n,mind=10;
    if(n%10<mind && n%10!=0) mind=n%10;
    if(n/10%10<mind && n/10%10!=0) mind=n/10%10;
    if(n/100%10<mind && n/100%10!=0) mind=n/100%10;
    if(n/1000<mind && n/1000!=0) mind=n/1000;
    return 0;


There are no comments at the moment.