Set Operations Challenge

Hard Sets PRO
🔒 Login to Unlock

Problem Statement

Write a Python program that takes two sets of numbers and returns the sum of elements present in their union minus the intersection.

Input Format

Line 1: First set integers. Line 2: Second set integers.

Output Format

Print the resulting integer sum.

Constraints

Integer sets

Sample Input

1 2 3
2 3 4

Sample Output

5

Explanation

Union minus intersection is equivalent to the symmetric difference sum.

Starter Code

def set_challenge(s1, s2):
    # Write your code here
    pass

s1 = set(map(int, input().split()))
s2 = set(map(int, input().split()))
print(set_challenge(s1, s2))

Limits

  • Time Limit: 1s
  • Memory Limit: 256MB

Embedded C Programming

Updated: March 15, 2026
Intermediate

Embedded systems rely on efficient low-level programming to interact directly with hardware. In this course, you will learn how to write practical Embedded C programs used in real microcontroller-based systems. Rather than focusing only on theory, this course follows a practice-driven approach. Each lesson includes hands-on coding exercises that simulate real firmware development tasks used