1 solutions

  • 0
    @ 2025-11-5 17:01:23

    C++ :

    #include<cstdio>
    #include<cstdlib>
    #include<ctime>
    #include<iostream>
    #include<math.h>
    #define for1( i, a, b ) for( int i = a; i <= b; i++ )
    using namespace std;
    
    int main()
    {
    
        int s = 0;
        for1( x, 1, 9 ) for1( y, 1, 9 ) {
            if( x == y ) continue;
            for1( i, 1, 9 ) for1( j, 1, 9 ) {
                if( i == j ) continue;
                if( y * j * (10 * x + i) == x * i * (10 * y + j) )
                    s++;
            }
        }
        printf("%d\n", s);
        return 0;
    }
    
    
    • 1

    Information

    ID
    18159
    Time
    1000ms
    Memory
    128MiB
    Difficulty
    (None)
    Tags
    # Submissions
    0
    Accepted
    0
    Uploaded By