Files
wehub-resource-sync dde272c4b8
i18n - Build Validation / Validate i18n Builds (24) (push) Has been cancelled
CI - Node.js / Lint (24) (push) Has been cancelled
CI - Node.js / Build (24) (push) Has been cancelled
CI - Node.js / Test (24) (push) Has been cancelled
CI - Node.js / Test - Upcoming Changes (24) (push) Has been cancelled
CI - Node.js / Test - i18n (italian, 24) (push) Has been cancelled
CI - Node.js / Test - i18n (portuguese, 24) (push) Has been cancelled
CD - Docker - GHCR Images / Build and Push Images (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 11:55:53 +08:00

22 KiB

id, title, challengeType, dashedName
id title challengeType dashedName
697a49e6ff50d756c9b6935d Challenge 180: 2026 Winter Games Day 1: Opening Day 29 challenge-180

--description--

Today marks the start of the 2026 Winter Games. The next 17 days will bring you coding challenges inspired by them.

For the first one, you are given a two-letter country code and need to return the flag emoji for that country.

Use this list:

Country Code Flag
Albania "AL" "🇦🇱"
Andorra "AD" "🇦🇩"
Argentina "AR" "🇦🇷"
Armenia "AM" "🇦🇲"
Australia "AU" "🇦🇺"
Austria "AT" "🇦🇹"
Azerbaijan "AZ" "🇦🇿"
Belgium "BE" "🇧🇪"
Benin "BJ" "🇧🇯"
Bolivia "BO" "🇧🇴"
Bosnia and Herzegovina "BA" "🇧🇦"
Brazil "BR" "🇧🇷"
Bulgaria "BG" "🇧🇬"
Canada "CA" "🇨🇦"
Chile "CL" "🇨🇱"
China "CN" "🇨🇳"
Colombia "CO" "🇨🇴"
Croatia "HR" "🇭🇷"
Cyprus "CY" "🇨🇾"
Czech Republic "CZ" "🇨🇿"
Denmark "DK" "🇩🇰"
Ecuador "EC" "🇪🇨"
Eritrea "ER" "🇪🇷"
Estonia "EE" "🇪🇪"
Finland "FI" "🇫🇮"
France "FR" "🇫🇷"
Georgia "GE" "🇬🇪"
Germany "DE" "🇩🇪"
Great Britain "GB" "🇬🇧"
Greece "GR" "🇬🇷"
Guinea-Bissau "GW" "🇬🇼"
Haiti "HT" "🇭🇹"
Hong Kong "HK" "🇭🇰"
Hungary "HU" "🇭🇺"
Iceland "IS" "🇮🇸"
India "IN" "🇮🇳"
Iran "IR" "🇮🇷"
Ireland "IE" "🇮🇪"
Israel "IL" "🇮🇱"
Italy "IT" "🇮🇹"
Jamaica "JM" "🇯🇲"
Japan "JP" "🇯🇵"
Kazakhstan "KZ" "🇰🇿"
Kenya "KE" "🇰🇪"
Kosovo "XK" "🇽🇰"
Kyrgyzstan "KG" "🇰🇬"
Latvia "LV" "🇱🇻"
Lebanon "LB" "🇱🇧"
Liechtenstein "LI" "🇱🇮"
Lithuania "LT" "🇱🇹"
Luxembourg "LU" "🇱🇺"
Madagascar "MG" "🇲🇬"
Malaysia "MY" "🇲🇾"
Malta "MT" "🇲🇹"
Mexico "MX" "🇲🇽"
Moldova "MD" "🇲🇩"
Monaco "MC" "🇲🇨"
Mongolia "MN" "🇲🇳"
Montenegro "ME" "🇲🇪"
Morocco "MA" "🇲🇦"
Netherlands "NL" "🇳🇱"
New Zealand "NZ" "🇳🇿"
Nigeria "NG" "🇳🇬"
North Macedonia "MK" "🇲🇰"
Norway "NO" "🇳🇴"
Pakistan "PK" "🇵🇰"
Philippines "PH" "🇵🇭"
Poland "PL" "🇵🇱"
Portugal "PT" "🇵🇹"
Puerto Rico "PR" "🇵🇷"
Romania "RO" "🇷🇴"
San Marino "SM" "🇸🇲"
Saudi Arabia "SA" "🇸🇦"
Serbia "RS" "🇷🇸"
Singapore "SG" "🇸🇬"
Slovakia "SK" "🇸🇰"
Slovenia "SI" "🇸🇮"
South Africa "ZA" "🇿🇦"
South Korea "KR" "🇰🇷"
Spain "ES" "🇪🇸"
Sweden "SE" "🇸🇪"
Switzerland "CH" "🇨🇭"
Thailand "TH" "🇹🇭"
Trinidad & Tobago "TT" "🇹🇹"
Turkey "TR" "🇹🇷"
Ukraine "UA" "🇺🇦"
United Arab Emirates "AE" "🇦🇪"
United States "US" "🇺🇸"
Uruguay "UY" "🇺🇾"
Uzbekistan "UZ" "🇺🇿"
Venezuela "VE" "🇻🇪"

--hints--

get_flag("AL") should return "🇦🇱".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("AL"), "🇦🇱")`)
}})

get_flag("AD") should return "🇦🇩".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("AD"), "🇦🇩")`)
}})

get_flag("AR") should return "🇦🇷".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("AR"), "🇦🇷")`)
}})

get_flag("AM") should return "🇦🇲".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("AM"), "🇦🇲")`)
}})

get_flag("AU") should return "🇦🇺".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("AU"), "🇦🇺")`)
}})

get_flag("AT") should return "🇦🇹".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("AT"), "🇦🇹")`)
}})

get_flag("AZ") should return "🇦🇿".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("AZ"), "🇦🇿")`)
}})

get_flag("BE") should return "🇧🇪".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("BE"), "🇧🇪")`)
}})

get_flag("BJ") should return "🇧🇯".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("BJ"), "🇧🇯")`)
}})

get_flag("BO") should return "🇧🇴".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("BO"), "🇧🇴")`)
}})

get_flag("BA") should return "🇧🇦".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("BA"), "🇧🇦")`)
}})

get_flag("BR") should return "🇧🇷".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("BR"), "🇧🇷")`)
}})

get_flag("BG") should return "🇧🇬".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("BG"), "🇧🇬")`)
}})

get_flag("CA") should return "🇨🇦".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("CA"), "🇨🇦")`)
}})

get_flag("CL") should return "🇨🇱".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("CL"), "🇨🇱")`)
}})

get_flag("CN") should return "🇨🇳".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("CN"), "🇨🇳")`)
}})

get_flag("CO") should return "🇨🇴".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("CO"), "🇨🇴")`)
}})

get_flag("HR") should return "🇭🇷".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("HR"), "🇭🇷")`)
}})

get_flag("CY") should return "🇨🇾".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("CY"), "🇨🇾")`)
}})

get_flag("CZ") should return "🇨🇿".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("CZ"), "🇨🇿")`)
}})

get_flag("DK") should return "🇩🇰".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("DK"), "🇩🇰")`)
}})

get_flag("EC") should return "🇪🇨".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("EC"), "🇪🇨")`)
}})

get_flag("ER") should return "🇪🇷".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("ER"), "🇪🇷")`)
}})

get_flag("EE") should return "🇪🇪".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("EE"), "🇪🇪")`)
}})

get_flag("FI") should return "🇫🇮".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("FI"), "🇫🇮")`)
}})

get_flag("FR") should return "🇫🇷".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("FR"), "🇫🇷")`)
}})

get_flag("GE") should return "🇬🇪".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("GE"), "🇬🇪")`)
}})

get_flag("DE") should return "🇩🇪".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("DE"), "🇩🇪")`)
}})

get_flag("GB") should return "🇬🇧".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("GB"), "🇬🇧")`)
}})

get_flag("GR") should return "🇬🇷".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("GR"), "🇬🇷")`)
}})

get_flag("GW") should return "🇬🇼".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("GW"), "🇬🇼")`)
}})

get_flag("HT") should return "🇭🇹".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("HT"), "🇭🇹")`)
}})

get_flag("HK") should return "🇭🇰".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("HK"), "🇭🇰")`)
}})

get_flag("HU") should return "🇭🇺".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("HU"), "🇭🇺")`)
}})

get_flag("IS") should return "🇮🇸".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("IS"), "🇮🇸")`)
}})

get_flag("IN") should return "🇮🇳".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("IN"), "🇮🇳")`)
}})

get_flag("IR") should return "🇮🇷".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("IR"), "🇮🇷")`)
}})

get_flag("IE") should return "🇮🇪".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("IE"), "🇮🇪")`)
}})

get_flag("IL") should return "🇮🇱".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("IL"), "🇮🇱")`)
}})

get_flag("IT") should return "🇮🇹".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("IT"), "🇮🇹")`)
}})

get_flag("JM") should return "🇯🇲".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("JM"), "🇯🇲")`)
}})

get_flag("JP") should return "🇯🇵".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("JP"), "🇯🇵")`)
}})

get_flag("KZ") should return "🇰🇿".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("KZ"), "🇰🇿")`)
}})

get_flag("KE") should return "🇰🇪".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("KE"), "🇰🇪")`)
}})

get_flag("XK") should return "🇽🇰".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("XK"), "🇽🇰")`)
}})

get_flag("KG") should return "🇰🇬".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("KG"), "🇰🇬")`)
}})

get_flag("LV") should return "🇱🇻".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("LV"), "🇱🇻")`)
}})

get_flag("LB") should return "🇱🇧".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("LB"), "🇱🇧")`)
}})

get_flag("LI") should return "🇱🇮".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("LI"), "🇱🇮")`)
}})

get_flag("LT") should return "🇱🇹".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("LT"), "🇱🇹")`)
}})

get_flag("LU") should return "🇱🇺".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("LU"), "🇱🇺")`)
}})

get_flag("MG") should return "🇲🇬".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("MG"), "🇲🇬")`)
}})

get_flag("MY") should return "🇲🇾".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("MY"), "🇲🇾")`)
}})

get_flag("MT") should return "🇲🇹".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("MT"), "🇲🇹")`)
}})

get_flag("MX") should return "🇲🇽".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("MX"), "🇲🇽")`)
}})

get_flag("MD") should return "🇲🇩".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("MD"), "🇲🇩")`)
}})

get_flag("MC") should return "🇲🇨".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("MC"), "🇲🇨")`)
}})

get_flag("MN") should return "🇲🇳".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("MN"), "🇲🇳")`)
}})

get_flag("ME") should return "🇲🇪".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("ME"), "🇲🇪")`)
}})

get_flag("MA") should return "🇲🇦".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("MA"), "🇲🇦")`)
}})

get_flag("NL") should return "🇳🇱".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("NL"), "🇳🇱")`)
}})

get_flag("NZ") should return "🇳🇿".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("NZ"), "🇳🇿")`)
}})

get_flag("NG") should return "🇳🇬".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("NG"), "🇳🇬")`)
}})

get_flag("MK") should return "🇲🇰".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("MK"), "🇲🇰")`)
}})

get_flag("NO") should return "🇳🇴".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("NO"), "🇳🇴")`)
}})

get_flag("PK") should return "🇵🇰".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("PK"), "🇵🇰")`)
}})

get_flag("PH") should return "🇵🇭".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("PH"), "🇵🇭")`)
}})

get_flag("PL") should return "🇵🇱".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("PL"), "🇵🇱")`)
}})

get_flag("PT") should return "🇵🇹".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("PT"), "🇵🇹")`)
}})

get_flag("PR") should return "🇵🇷".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("PR"), "🇵🇷")`)
}})

get_flag("RO") should return "🇷🇴".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("RO"), "🇷🇴")`)
}})

get_flag("SM") should return "🇸🇲".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("SM"), "🇸🇲")`)
}})

get_flag("SA") should return "🇸🇦".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("SA"), "🇸🇦")`)
}})

get_flag("RS") should return "🇷🇸".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("RS"), "🇷🇸")`)
}})

get_flag("SG") should return "🇸🇬".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("SG"), "🇸🇬")`)
}})

get_flag("SK") should return "🇸🇰".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("SK"), "🇸🇰")`)
}})

get_flag("SI") should return "🇸🇮".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("SI"), "🇸🇮")`)
}})

get_flag("ZA") should return "🇿🇦".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("ZA"), "🇿🇦")`)
}})

get_flag("KR") should return "🇰🇷".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("KR"), "🇰🇷")`)
}})

get_flag("ES") should return "🇪🇸".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("ES"), "🇪🇸")`)
}})

get_flag("SE") should return "🇸🇪".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("SE"), "🇸🇪")`)
}})

get_flag("CH") should return "🇨🇭".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("CH"), "🇨🇭")`)
}})

get_flag("TH") should return "🇹🇭".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("TH"), "🇹🇭")`)
}})

get_flag("TT") should return "🇹🇹".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("TT"), "🇹🇹")`)
}})

get_flag("TR") should return "🇹🇷".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("TR"), "🇹🇷")`)
}})

get_flag("UA") should return "🇺🇦".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("UA"), "🇺🇦")`)
}})

get_flag("AE") should return "🇦🇪".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("AE"), "🇦🇪")`)
}})

get_flag("US") should return "🇺🇸".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("US"), "🇺🇸")`)
}})

get_flag("UY") should return "🇺🇾".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("UY"), "🇺🇾")`)
}})

get_flag("UZ") should return "🇺🇿".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("UZ"), "🇺🇿")`)
}})

get_flag("VE") should return "🇻🇪".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(get_flag("VE"), "🇻🇪")`)
}})

--seed--

--seed-contents--

def get_flag(code):

    return code

--solutions--

def get_flag(code):
    return "".join(chr(127397 + ord(char)) for char in code)