ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1014. Product of Digits

anyone can help me? what's wrong wiht this code?
Posted by Hao-Kang Hung 17 May 2001 17:47
#include <iostream.h>
int main(void)
{
    int n;
    int i,a,b;
    //int buff[81];

    cin >> n;

    if(n>81) cout<<"?";
    else if(n>0) {
        for(i=9;i>=1;i--){
            if(n%i==0) {
                a=n/i;
                b=n/a;
                if(a>9) cout<<"?";
                else cout<<a<<b;
                break;
            }
        }
    }
    if(n==0) cout<<"10";
    return 0;
}

or anyone can tell me what the traps in this problem are?
'?'='-1'
Posted by bighead 31 May 2001 15:45
smile:)
Are you chinese?
hehe.
?='-1'