Loading...
Given a word-level translation dictionary and a source sentence, translate each word. If a word is not in the dictionary, keep it unchanged.
Input format:
All matching is case-insensitive, but output the translation in its original form from the dictionary.
3 hello hola world mundo good bueno hello world
hola mundo
Step 1: Build dictionary hello → hola, world → mundo, good → bueno
Step 2: Translate each word "hello" → found: "hola" "world" → found: "mundo"
Result: "hola mundo"