Sort by

recency

|

39 Discussions

|

  • + 0 comments

    a passion for technology and a commitment to delivering valuable content at mydroidalerts.com, I am here to learn, inform, inspire, and engage.

  • + 0 comments

    def min_operations(n, boxes): # Separate the balls in each box for i in range(1, n): for j in range(3): if boxes[i][j] != boxes[0][j]: boxes[i][j] = boxes[0][j]

    # Count the total number of operations
    operations = 0
    for i in range(n):
        for j in range(3):
            if boxes[i][j] != boxes[0][j]:
                operations += 1
    
    return operations
    

    Input reading

    n = int(input()) # Number of boxes boxes = [list(map(int, input().split())) for _ in range(n)] # List of boxes

    Get the result

    result = min_operations(n, boxes) Run this Python code and input the number of boxes along with the colors of balls in each box. It will output the minimal number of operations required to separate the balls. Moreover, for debugging apply update from adb and then run this python code.

    Print the result

    print(result)

  • + 0 comments

    gg, no pyhon option

  • + 1 comment

    Wrong Answer :(

    2/2 test cases failed

    Sample Test case 0

    Sample Test case 1 Compiler Message Wrong Answer Input (stdin) 1 5 6 8 Your Output (stdout) -1 Expected Output -1

    Wrong Answer :(

    2/2 test cases failed

    Sample Test case 0

    Sample Test case 1 Compiler Message Wrong Answer Input (stdin) 3 1 1 1 1 1 1 1 1 1 Your Output (stdout) 6 Expected Output 6

  • + 0 comments

    Is Python not cool for this task? :D