Wrong answer 5%. Qual o erro ?

DEVGRW asked 2 years ago

using namespace std;
int main()
    unsigned long int n, x, y, result;
    result = 0;
    cin >> n;
        cin >> x;
        cin >> y;
        result = (pow(26,x))*(pow(10,y));
        cout <<result << endl;
    return 0;

Remember not post solutions. Your post may be reviewed by our moderators.

  • Pedro Feitosa replied 1 year ago

    Testei o código, e quando a resposta é '0 0' dá 1, quando na verdade deveria dar 0.

  • feodorv replied 2 years ago

    First of all if c and d are zeroes what is the answer? Secondly you use the float functions for the integer arithmetic.