• + 0 comments

    include

    include

    include

    include

    include

    include

    include

    include

    include

    include

    char* readline(); char* ltrim(char*); char* rtrim(char*);

    int main() { int t; // Number of test cases scanf("%d", &t);

    while (t > 0) {
        long int k;
        scanf("%ld", &k);
        if(k%2==0)
        {
           long int i = k / 2 ; // Divide by 2 and store as double
         // Convert to integer by truncating decimal part
         long int j = k - i; // Remaining cuts for the other dimension
    
        // Calculate maximum pieces as a product of integers
        long int maxPieces = i * j;
    
        printf("%ld\n", maxPieces); // Print result as integer
        }
    
        else {
         long double i = ( long double)k / 2 + 0.5; // Divide by 2 and store as double
         // Convert to integer by truncating decimal part
        long double j = k - i; // Remaining cuts for the other dimension
    
        // Calculate maximum pieces as a product of integers
       long int maxPieces = i * j;
    
        printf("%ld\n", maxPieces); // Print result as integer}
        }
        t--;
    
    }
    return 0;
    

    }