UVA 11371 - Number Theory for Newbies

Problem PDF

Solution:

#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;
int main()
{
    string n,a;
long long s,b,c,d,l;
while(cin>>n)
{
    sort(n.begin(),n.end());
    a=n;
     if(a[0]=='0')
        {
            for(int i=1;i
https://github.com/Shipu/OnlineJudgeProblemSolutionWithCPlusPlus/tree/master/uva/11371/11371.cpp