Highest Value

Medium Dictionaries PRO
🔒 Login to Unlock

Problem Statement

Write a Python program to find and print the key associated with the highest integer value in a dictionary.

Input Format

Space-separated key-value pairs where values are integers (e.g., `a 10 b 50 c 30`).

Output Format

Print the key with the maximum value.

Constraints

Non-empty dictionary

Sample Input

a 10 b 50 c 30

Sample Output

b

Explanation

Use `max()` with `key=d.get` to find the key corresponding to the max value.

Starter Code

def max_key(d):
    # Write your code here
    pass

raw = input().split()
d = {raw[i]: int(raw[i+1]) for i in range(0, len(raw), 2)}
print(max_key(d))

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