2
\$\begingroup\$

Challenge

Given two non negative integers a < b, output all countries, from the below Top 100 Countries, where area is between a and b: a<= area <= b.

Example

147500,180000   --> uruguay, suriname, tunisia, bangladesh
1200000,1300000 --> peru, chad, niger, angola, mali, south africa
1234567,1256789 --> angola, mali

Top 100 Countries by Area (2017):

russia..........................17098250
canada...........................9984670
united states....................9831510
china............................9562911
brazil...........................8515770
australia........................7741220
india............................3287259
argentina........................2780400
kazakhstan.......................2724902
congo............................2686860
algeria..........................2381740
saudi arabia.....................2149690
mexico...........................1964380
indonesia........................1910931
sudan............................1879358
libya............................1759540
iran.............................1745150
mongolia.........................1564120
peru.............................1285220
chad.............................1284000
niger............................1267000
angola...........................1246700
mali.............................1240190
south africa.....................1219090
colombia.........................1141749
ethiopia.........................1104300
bolivia..........................1098580
mauritania.......................1030700
egypt............................1001450
tanzania..........................947300
nigeria...........................923770
venezuela.........................912050
namibia...........................824290
mozambique........................799380
pakistan..........................796100
turkey............................785350
chile.............................756096
zambia............................752610
myanmar...........................676590
afghanistan.......................652860
south sudan.......................644330
somalia...........................637660
central african republic..........622980
ukraine...........................603550
madagascar........................587295
botswana..........................581730
kenya.............................580370
france............................549087
yemen.............................527970
thailand..........................513120
spain.............................505940
turkmenistan......................488100
cameroon..........................475440
papua new guinea..................462840
sweden............................447420
uzbekistan........................447400
morocco...........................446550
iraq..............................435050
greenland.........................410450
paraguay..........................406752
zimbabwe..........................390760
norway............................385178
japan.............................377962
germany...........................357380
finland...........................338420
vietnam...........................330967
malaysia..........................330800
cote d'ivoire.....................322460
poland............................312680
oman..............................309500
italy.............................301340
philippines.......................300000
burkina faso......................274220
new zealand.......................267710
gabon.............................267670
ecuador...........................256370
guinea............................245860
united kingdom....................243610
uganda............................241550
ghana.............................238540
romania...........................238390
laos..............................236800
guyana............................214970
belarus...........................207600
kyrgyz............................199949
senegal...........................196710
syria.............................185180
cambodia..........................181040
uruguay...........................176220
suriname..........................163820
tunisia...........................163610
bangladesh........................147630
nepal.............................147180
tajikistan........................141376
greece............................131960
nicaragua.........................130370
north korea.......................120540
malawi............................118480
eritrea...........................117600
benin.............................114760

Names as separate list

russia
canada
united states
china
brazil
australia
india
argentina
kazakhstan
congo
algeria
saudi arabia
mexico
indonesia
sudan
libya
iran
mongolia
peru
chad
niger
angola
mali
south africa
colombia
ethiopia
bolivia
mauritania
egypt
tanzania
nigeria
venezuela
namibia
mozambique
pakistan
turkey
chile
zambia
myanmar
afghanistan
south sudan
somalia
central african republic
ukraine
madagascar
botswana
kenya
france
yemen
thailand
spain
turkmenistan
cameroon
papua new guinea
sweden
uzbekistan
morocco
iraq
greenland
paraguay
zimbabwe
norway
japan
germany
finland
vietnam
malaysia
cote d'ivoire
poland
oman
italy
philippines
burkina faso
new zealand
gabon
ecuador
guinea
united kingdom
uganda
ghana
romania
laos
guyana
belarus
kyrgyz
senegal
syria
cambodia
uruguay
suriname
tunisia
bangladesh
nepal
tajikistan
greece
nicaragua
north korea
malawi
eritrea
benin

Areas as separate lists

17098250
9984670
9831510
9562911
8515770
7741220
3287259
2780400
2724902
2686860
2381740
2149690
1964380
1910931
1879358
1759540
1745150
1564120
1285220
1284000
1267000
1246700
1240190
1219090
1141749
1104300
1098580
1030700
1001450
947300
923770
912050
824290
799380
796100
785350
756096
752610
676590
652860
644330
637660
622980
603550
587295
581730
580370
549087
527970
513120
505940
488100
475440
462840
447420
447400
446550
435050
410450
406752
390760
385178
377962
357380
338420
330967
330800
322460
312680
309500
301340
300000
274220
267710
267670
256370
245860
243610
241550
238540
238390
236800
214970
207600
199949
196710
185180
181040
176220
163820
163610
147630
147180
141376
131960
130370
120540
118480
117600
114760

Rules

  • The input and output can be given in any convenient format.
  • The output can be in any case.
  • No need to handle invalid input values.
  • Either a full program or a function are acceptable. If a function, you can return the output rather than printing it.
  • If possible, please include a link to an on-line testing environment so other people can try out your code!
  • Standard loopholes are forbidden.
  • The code is not allowed to import the list from file or internet.
  • This is so all usual golfing rules apply, and the shortest code (in bytes) wins.
\$\endgroup\$
  • 3
    \$\begingroup\$ some comments for the down-votes... \$\endgroup\$ – mdahmoune Feb 1 at 18:28
  • 6
    \$\begingroup\$ I believe the reason for the down-votes is the fact that this isn't a challenge that is interesting to golf. There are two problems to solve: First, given a country list and a size list, get the names of the countries where the size is between two values. This is solved in ~50 bytes and not very hard to golf. The second problem is compressing the data. But, given that the program needs to know the exact sizes of each country and the exact names of each country, there isn't very much space to compress this. \$\endgroup\$ – Black Owl Kai Feb 1 at 18:56
  • \$\begingroup\$ Does the output need to be in order of size or can it be unsorted? \$\endgroup\$ – Veskah Feb 1 at 21:20
  • 1
    \$\begingroup\$ @mdahmoune I feel like this challenge is too "large" for people to want to go through and find clever rules for this long list of countries \$\endgroup\$ – qwr Feb 2 at 19:58
  • 1
    \$\begingroup\$ Sorry, got distracted last night before I could follow up on my -1 which was pretty much for the same reasons outlined by @BlackOwlKai; there is little to no room for creative compression or golfing techniques. This may have been better with some reworking and custom scoring as a code-challenge. \$\endgroup\$ – Shaggy Feb 3 at 0:02
4
\$\begingroup\$

Node.js,  1170  1164 bytes

Takes input as (a)(b).

a=>b=>eval(require('zlib').inflateSync(Buffer.from('eNpFU8uS6jYQ/RVWyUzdU7cwmNeC2d9vSKUybattC9uSkeQh5utzZCbJBij147yaz0qdddBgU1DBKIM8LJwPqdv0Pj85W0uQdha0QbVWJLnZ3sYkDk4nGVCJawcxGjuk2dloBXEO1smomMPM0QW1jJU3ubKE/KlOW472S2iXJyodJMwR7byIEwziI4IfxbG17fLT3Ioz/HI2qdn01rXGj+y3jhS1nsX4gFYqn0k9Nk+lEGdQzYG9smkkekydHew0cSTCJhkWZAhMfm2tfdKN+d1+eRt0NWLJSr6sJipBY93a1mrg0IKbTNkAHx5U97RjJdVDMb2sWlavXgM2yB2jD76uPeZnpd/exYcaJbpMs2wy528xdEqDp45E7iPTeXVPwphSJ3ZduigraII4BtKrWwSVT/GRrRrFSCuRqWHuA8cUtboUZNhIE5im2wSd5mqwNSIdGHIefmbgcTaEkiZb/oIdmcfIRU/Gx7aaDupKTBcy/1Yy+rV8nxV0yubGL+b7nJkqz4eO8YWNzzVPbZcpkSQvJK0PlR/sVy6kzvopo/jBr3AvVi/SORELXpr/dynZiMGkYSaD/M4Jmu0w2GrJJ5jFWGc882Zp1L8tE4gyG7thTBlAhhe5Os+jl6f03SpJQkvLeDl5QW6cYzYwsw3ytEN2wv13jhxJvCk6S+vBQybe5884DTZ94vNnY4ek4e3tL+j79ePN/LgWxx+8lKi/XHr7LE/qsS9LysXuXBK7RMG/Tt51rCNU0Y0ljgozehykRNkxUsehzuCsDc6HEv70mioV+8tr0Y6T1c2jblnGiQui9Si0xKVgV0OISXE5KQ4FzqeAgc/j1OK83eJ4aAnbotyNCBfiETt4lOj2JJIUyuabL3Ei7ZZIzlQoyvFEAI9jmWCLC4auRHsmeOVxMR53Uey8IfrUo9ippZ/UQVqBRPfZCbMtcd9TwZZSiqxh19SUT91F1TnsptDA1S9BI6XZOyusyoU/jgNHm0SPzL5GcSgCilTtcZzuinPn6ciFAEV9arErbjXzLR0OGv2E2He05+z0gEus+dqXHmdnov8/zD/0T+y37+8fV/mt+rgamOv2/R9Hndmv','base64'))+'')

Try it online!

Inflated code

`benin,eritrea,malawi,(…),russia`.split`,`
filter((_, e) =>
  (
    d += 16 + parseInt(
      `47eo,344,so,(…),8ndso`.split`,`[e],
      30
    )
  ) >= a & b >= d,
  d = 0
)

The base (30) and the hardcoded offset (16) were chosen to optimize the compression of the delta values.

\$\endgroup\$
  • \$\begingroup\$ I was about to question your choice of base-30 over base-36 but the saw your note at the end just before I posted my comment. \$\endgroup\$ – Shaggy Feb 1 at 21:39
  • 3
    \$\begingroup\$ @Shaggy ...And decided to post this one instead. :P \$\endgroup\$ – Quintec Feb 1 at 21:50
4
\$\begingroup\$

Wolfram Language 68 bytes

I am uncertain whether this satisfies the requirements.

This uses a built-in function named CountryData. Wolfram Language knows the areas of all the countries in the world, so it's simply a matter of determining those countries in which the area falls within the given interval.

 c=CountryData;Cases[c@"Countries",x_/;(a=c[x,"Area"][[1]])<=#2&&a>=#]&
\$\endgroup\$
  • \$\begingroup\$ As soon as I saw this challenge, I knew Mathematica would have a built-in! I even went looking for it myself but, Jebus, Mathematica is fecking huge! \$\endgroup\$ – Shaggy Feb 3 at 0:04
  • \$\begingroup\$ As soon as it’s not an import from a file nor internet, it’s ok +1 \$\endgroup\$ – mdahmoune Feb 5 at 22:01
2
\$\begingroup\$

Python 3, 1961 1579 1353 bytes

lambda a,b:["india,argentina,kazakhstan,congo,algeria,saudi arabia,mexico,indonesia,sudan,libya,iran,mongolia,peru,chad,niger,angola,mali,south africa,colombia,ethiopia,bolivia,mauritania,egypt,tanzania,nigeria,venezuela,namibia,mozambique,pakistan,turkey,chile,zambia,myanmar,afghanistan,south sudan,somalia,central african republic,ukraine,madagascar,botswana,kenya,france,yemen,thailand,spain,turkmenistan,cameroon,papua new guinea,sweden,uzbekistan,morocco,iraq,greenland,paraguay,zimbabwe,norway,japan,germany,finland,vietnam,malaysia,cote d'ivoire,poland,oman,italy,philippines,burkina faso,new zealand,gabon,ecuador,guinea,united kingdom,uganda,ghana,romania,laos,guyana,belarus,kyrgyz,senegal,syria,cambodia,uruguay,suriname,tunisia,bangladesh,nepal,tajikistan,greece,nicaragua,north korea,malawi,eritrea,benin,russia,canada,united states,china,brazil,australia".split(",")[i]for i in range(100)if a<=int((11*'1'+83*'0'+'a55554ynmlfa64411xrrrqqqonnmlkjjhhhgggeddddccccbbaaaa9999988888777766666'+10*'5'+'4444333333332222226yuo2lglel123yapeiji5pk4goj3gasjo42t74iztocxlgfrbzug6xllkbspd93n933wpmgfvqqh976432lga7yvrii551tsljigh0qyixgdj7rpqh4okvoqmyxnz3oaqxsq0t9zep2r60pp5vtodxdmu487kopui7mr4d8t9tihlkjtpyd2xpv6asvoze8wk3tl0fqj371st5rcq0gm4fe4eskogkqm904k2waqy0waou602s0ar6efucwcoocs6qeogey8kjw8k8kc8eaegyq4yseo56ww0kquc4kec4oseyif6w')[i::100],36)<=b]

Try it online!

-382 bytes thanks to Shaggy

-226 bytes by a new data storage method and some changes by Jonathan Allan

\$\endgroup\$
  • \$\begingroup\$ You can drop the space before the join \$\endgroup\$ – mdahmoune Feb 1 at 18:25
  • 2
    \$\begingroup\$ You could probably save quite a bit by combining each of the arrays into comma-delimited strings and then splitting on comma. \$\endgroup\$ – Shaggy Feb 1 at 18:29
  • \$\begingroup\$ Straight string comparisons of the hex won't work. For example f(17, 18) will yield 'colombia'. \$\endgroup\$ – Jonathan Allan Feb 1 at 19:16
  • \$\begingroup\$ You don't need to format the output with join you can just have a list comprehension. You can probably save with a zip. (BTW if you still go for the hex string approach note that you could remove both [2:] and instead use '0x'+'104e60a ...[i]) \$\endgroup\$ – Jonathan Allan Feb 1 at 19:21
  • \$\begingroup\$ Jaysis, 382 bytes?! Didn't think it'd be quite that much! \$\endgroup\$ – Shaggy Feb 1 at 21:37
2
\$\begingroup\$

05AB1E, 845 726 724 bytes

Ÿ•LˆB1?+β»,¦ïp,fpîÃUK„»L`l¢~Rζ₃f(–α9OÌHíÜ$;’*ʸšöÏG∞zW¦pƒ;₃øÅ^êà©Q₁¤
cΘ¥₄₃₁¾«ål5ó eù&AŠ×Y‡p3ΓòÔ¬Š|üÛT∊DìaM1Gæ³RùVòí¢ʒʒP,vζšƶ«Ƶ¹”jWL¦¹†Ãн‘ƶËθ±…KãÐΓ¼¿λ΋½ª%=KHÛá$çöα=ÍTćÒ¹∞ïkѧqγHšÎGêĆ[‹Î½žMcǝEØιœ₆λÔ#ζ₆Σγ’Ƶä"‚žlóƒβÀÙlƵ=αн#$½/Y€Š:¹!
ÿFw91?ì3-ŸWuµ\ú‹µú1vPε»ã#º{ǝ¯¼¢vN=тLʒ”T³é¶ùÅγ¬ë‘/ОaÕÄ"Õ-Ý–°ǝ-β₆›*ŽBÂ₂₄q••17ò÷•вå.•1d|WÈ!ÝWàÁвZr¦h…ù„D&«r4¡8!’}`U²†ánB;ÂMÒ¤wt\pm≠¤Ëм h6oìIdšÁô1•#„af…a f:„di" d'i":`’ž¦0…¥0ƒŠ ƒ¼0‡¤0£‰0ˆ‚0Š™0²Ð0Û½0Ê›0Þ²0»´ ¸0Žè0°×0Ïï0ÿ0¨¤0ãì0¾ç0Êä0èå0àÜ0çÐ0ƒÞ ‹…0©0׈0ÎÝ0ÿ0¬æ0̹0Äë0ã0ÌÚ0ص0¬¬0¤•0¸Ž0Ó±0ÜÞ0¹ä0ƒÞ Ïï0ê¢0‡Þ ïŽ •€0·±0Ý£0Êž0¼¤0ˆÖ0àç0§á0•ì0ÿ0å£0⎠€¢ «á0§…0Ý©0ÊŒ0•°0ˆ¨ˆÑ0ßÚ0ÄÒ0¬ì0Šè0‰Í0²á0°‚0°ˆ0ÿ0¯¬0ß»0í¿0°¦0ÿ0€¢ ™Æ0ÿ0Ìè0«á0ƒŠ Šß0ÑÝ0Ó•0À‹0ìÞ0äß0Öæ0ÿ0ã¼0Ñè0ÍÆ0Õ·0ÿ0Úˆ0Éã0ÄÑ0ÿ0«š0ÚÊ0„¡ ¡è0à›0ÿ0ÿ’0¡sÏ

No smart golfs yet, but will see what I can do later on.

Try it online or verify all test cases.

Explanation:

Ÿ                    # Get the inclusive range of the two (implicit) inputs
 •...•               # Compressed integer 1973189551155729951158047504888550693285038979215196451111846739112857422275219605859797606876792240255951887197422137126381236888252746087204379433177795015673735312875287174369802127043070332938030374559331221793543099653787758410730754595832945510288634919093697357543931716347226050469833259385438225825153429642271254788538576531893907231375001829235576168553954340620130825485946678723358989342130504637082203898949974502648169087327686854812063938661992036699706767699157860904798957505081143747312911246515350313735031397786562111474800728183906801552964415604114267221708014650503416371603814718203653991102167755222616117998692632503630077961754668397032445720874683416593177351139861390338743408903539745973060232
      •17ò÷•         # Compressed integer 17098251
            в        # Convert the large integer to Base-17098251 as list
             å       # Check for each if its in the ranged-list (1 if truthy; 0 if falsey)
.•...•               # Compressed string "benin eritrea tajikistan suriname kyrgyz gabon burkinafaso cotedivoire turkmenistan mauritania libya"
      #              # Split by spaces
       „af…a f:      # Replace "af" with "a f" (for "burkina faso")
       „di" d'i":    # Replace "di" with " d'i'" (for "cote d'ivoire")
                 `   # Push all strings as separated items to the stack
’...’                # Push dictionary string "russia0canada0united states0china0brazil0australia0india0argentina0kazakhstan0congo0algeria0saudi arabia0mexico0indonesia0sudan0ÿ0iran0mongolia0peru0chad0niger0angola0mali0south africa0colombia0ethiopia0bolivia0ÿ0egypt0tanzania0nigeria0venezuela0namibia0mozambique0pakistan0turkey0chile0zambia0myanmar0afghanistan0south sudan0somalia0central african republic0ukraine0madagascar0botswana0kenya0france0yemen0thailand0spain0ÿ0cameroon0papua new guinea0sweden0uzbekistan0morocco0iraq0greenland0paraguay0zimbabwe0norway0japan0germany0finland0vietnam0malaysia0ÿ0poland0oman0italy0philippines0ÿ0new zealand0ÿ0ecuador0guinea0united kingdom0uganda0ghana0romania0laos0guyana0belarus0ÿ0senegal0syria0cambodia0uruguay0ÿ0tunisia0bangladesh0nepal0ÿ0greece0nicaragua0north korea0malawi0ÿ0ÿ",
                     # where the `ÿ` are filled with the strings on the stack to form: "russia0canada0united states0china0brazil0australia0india0argentina0kazakhstan0congo0algeria0saudi arabia0mexico0indonesia0sudan0libya0iran0mongolia0peru0chad0niger0angola0mali0south africa0colombia0ethiopia0bolivia0mauritania0egypt0tanzania0nigeria0venezuela0namibia0mozambique0pakistan0turkey0chile0zambia0myanmar0afghanistan0south sudan0somalia0central african republic0ukraine0madagascar0botswana0kenya0france0yemen0thailand0spain0turkmenistan0cameroon0papua new guinea0sweden0uzbekistan0morocco0iraq0greenland0paraguay0zimbabwe0norway0japan0germany0finland0vietnam0malaysia0cote d'ivoire0poland0oman0italy0philippines0burkina faso0new zealand0gabon0ecuador0guinea0united kingdom0uganda0ghana0romania0laos0guyana0belarus0kyrgyz0senegal0syria0cambodia0uruguay0suriname0tunisia0bangladesh0nepal0tajikistan0greece0nicaragua0north korea0malawi0eritrea0benin"
 0¡                  # Split this by "0"
s                    # Swap to take the list of 0s and 1s again
 Ï                   # Only leave the strings which are truthy at the same index
                     # (and output the result implicitly)

See this 05AB1E tip of mine (sections How to use the dictionary?, How to compress strings not part of the dictionary?, How to compress large integers?, and How to compress integer lists?) to understand how the compression parts work.

\$\endgroup\$
2
\$\begingroup\$

1. Python 3.5, 1651 1458 1398 bytes

Script takes two arguments. Lists are compressed using LZMA BZ2 zlib, encoded to Ascii85 and stored as two comment lines after fileheader. Script reads itself, decode and uncompress these lines.

#!/usr/bin/python3
#GhO`I6%\,>%(lBO\a@"&E!__Y)$A-Ff<:j\Zp8G1Q=R\[aL$##cd[#Pij[XO8YuBARE6=2nKRD/).0>%g#JDN88bcljG2%`4dgK<6&DcfL6B^8a,Q'!/kQ'%Y-V9;b`T;[FBm3&5T5Ys2U;CmXCF5:aq71_o,S+(:/uX&2L\fa_-/Kd'3s6'[G]sCn=J+=>6L_s/WA*`k@\':,lZ\ajllj%bUG0!qCp9F]27HBY(^&g;oVer&mCo)2`N/hX]II^\`uAc4tBW-9;`g,5d;uq]U>#PY..CpNFN`coGkC/^iJ/obu7<Xd,P9mG+g'N^u=3rEV<?>g(ktsJ*-0h`)JN0Qd/g$HOCkHOS9NOk5I@9mZQ(AT,&:D;D=6G:^[[=SHh;43Hhl.<kEAOiIW\\PrK;#`D?:k8qUU%%3@#\g19gTi`i0D3F,XH+;50n"r1ef9*)"a%bqYamDW(>P'r!bI:.gVAFJm8ke"\jNT^XS'D6lJVC=QibmBbdYu]A8q<$V4oh+DO0HR653:K@ZfLgC/3eQ1hYB;?.Jjffo6Hki<jQp>/o`2CO`l:75X50!JL1D.3e=%;ln5E%^0_p`^=LEEs0IQl*(,e5p
#GhOI,<t5?f#XeVP%DCQs@Uj%oUjWTD(l41.HE#\:p4+)_#$1Vhad1Jm5*P-3'#*CKij5)RT]`;4pYs(Neg<]+lVk(SN$V1O9Pimd<c%%.IW.a[YSm[1ht!C1:I<SVjZTUuYN)7^7#D((KD4T-=AM;V^T&UWbMi,>Ya\!/(t[6!A*tabY2Lt='tB`J]`oHWl03e4Qa=fZMu[=U-hfuQCD>b8o=4o2"T](^/'MZsb3+#T@&p,HQpC)FCec9Pc,M&NdXUa=S#I(4#dd3;6_)*Z5X]!WZ\%VJ@B<m-&^)`PH9K1r2i(<4Qn2P8MFP!EJj1eD\H@e>m"$h-X4`AC]fg"I/tPODfK,?*5Ru-l`$`>#lJhuVj.;nHE<`u/&mBdGT\n$Vp'4N#:<19D9Z+4@P<2aQG[ohN)/bpcZ+ghPo`GO.K*_
from base64 import*;from zlib import decompress;from sys import*;(f,t)=[*map(int,argv[1:3])];g=open(argv[0],"r");l=g.readlines();g.close()
def d(l,n):return decompress(a85decode(l[n][1:-1])).decode().split("\n")
n=d(l,1);a=d(l,2);o=[]
for i,b in enumerate(a):
    if f<=int(b)<=t:o.append(n[i])
print("{},{}\t->\t{}".format(f,t,", ".join(o)))

I know, it's not pretty to abuse comments like this. But it works... for golfing. To include binary data in text file you need to encode it to printable chars only. But base64 encoding is not dense enough, that is why I used A85. But it has chars that need to be escaped in order to put this in python string.. So then I use comments :)

Explanation

# imports
from base64 import*
from zlib import decompress
from sys import*

# parse input as integers
(f,t)=[*map(int,argv[1:3])]

# open this file and read all lines
g=open(argv[0],"r");l=g.readlines();g.close()

# from array of lines get line n; strip leading "#" and trailing "\n"; decode from Ascii85; decompress; decode from bytes to string; split on newline
def d(l,n):return decompress(a85decode(l[n][1:-1])).decode().split("\n")

# decode list of names, list of areas and create empty output list
n=d(l,1);a=d(l,2);o=[]

# cycle through list of areas
for i,b in enumerate(a):

    # if curent area is between limits, append country to output list
    if f<=int(b)<=t:o.append(n[i])

# print formatted output
print("{},{}\t->\t{}".format(f,t,", ".join(o)))

edit: changed compression method and removed map(int) before enumerate

https://docs.python.org/3/library/zlib.html

\$\endgroup\$
1
\$\begingroup\$

Jelly, 736 bytes

“þṾṚSẸL£ỵƘhŀẠṗµA+QØḣœḢpṗżÐEn⁷ȦyẈ⁷g%v3ọṇ(Ƥd>OṾTṭAJẓṛṢƊƭḟ¢ẊȦ9c°ÐṄ5IqżQo⁾Ṣæṗʂ"OƥkpṙY!e}Q/ẆⱮṠyṄ0ØȥLYỊṃ~+æ+İbɠṇxƊƁjjtẓ?ạ5ỌżṆiⱮẆj/ȯ¬ẉ⁹Œ¿żÐX¥hẇyqJ~⁶Żḟ#1QJṗ¹n³H.ḋ(Ṣ^ỊẆKḲŒU[⁵6¢2ȯdG/⁼ṭḥİ!ƈ3ḤḳUıHṇlṄ⁽€ẆṠwẈƁḣḳµ!⁾³Ḋ¦Ṭḳ0ƈØʠ⁴æ?+Ịṙ4⁸8Żḅ| GḅɗṆĠKİb"ḃɲʠµY⁴ḟnỊẋ⁺V³ṚĖıknṠƊMeẓƬḌ⁺£©9⁴ȥøẓɦ&7ɱ_2ɠȷṂẋṚcṇṫḢ)MȮ¶I7ıṃ1LŻỌƊḞYrỴȦṠṣ3ḥ<Ƥ½’ḃ“¡æ⁽ż’e€³rƝḢ¤Tị“Ṇ¹zẏƥKDTịAjṇẒ¤<Ṁ6:-jOʂƑṆɠw@Ẉṙ]Ż§!œ~Cıu",©ḳṂƒḥ¢Ė~,ḲsĿỊƭṀjⱮḳ%o!Ðrḍ3©ƊZØq-JṪƤƘÑẹ04ⱮṂṛ'÷ƥÆƁ¦z¢Ẓ3kaṁ⁾ẏHnĊ^ḍỤfçÄŒṅṣḍƒb ybḤċÄæ¬).sḋ ėmẸeHẈŀ⁺U®`nɓƙt ZeNH+¥ḋỌLYÑ¥ḳƬȤƘ³ẓ½⁸¢ṛŻḍ\ƙß³ÞdȦḲµṫk¡ẓ⁶ẒṠƑ~ġ+=3þḌ÷z⁾ñ9cø.'3ṆN⁸0HḟN+ƒN⁼ƁKạṪƲ⁽żė@ÑṣT³ṠQƁ1ṭ©>]Ɱr&Ị}°rð0ċ4ntėṭiḣƤ^/æmẠ8ZṪ®$ÄOẏ¬⁻v!ƭh]ḟÄF^Ẇß2Ɗ8þṄÆ⁴)ƒṛ⁺ƭ©ẹẓÑ3⁵|F}ß8"ÞḂṣ⁷%ƙ9Ɱ:D¥ĖĠÆ7ƒṭṘ³ɓċ³ɱTƊDɼ>Ɗ;ẹẇЃµcKṁ⁺ḳRỤ®+®lUṛ½ẒʂƊḃNʋḥæṠḤmḲ³ɓÑ`Ɲṗ[]ṠȮẏ3lḍƤʂXṃ4#ʠ°µḄƈẈıḥıẉ®×ḊẈƝỤġOlṠÆU½ẏ½ċƒµKRW»Ỵ¤K

Try it online!

\$\endgroup\$
1
\$\begingroup\$

R, 1656 bytes

function(a,b)d$s[d$c>=a&d$c<=b];d=data.frame(strsplit("russia,canada,united states,china,brazil,australia,india,argentina,kazakhstan,congo,algeria,saudi arabia,mexico,indonesia,sudan,libya,iran,mongolia,peru,chad,niger,angola,mali,south africa,colombia,ethiopia,bolivia,mauritania,egypt,tanzania,nigeria,venezuela,namibia,mozambique,pakistan,turkey,chile,zambia,myanmar,afghanistan,south sudan,somalia,central african republic,ukraine,madagascar,botswana,kenya,france,yemen,thailand,spain,turkmenistan,cameroon,papua new guinea,sweden,uzbekistan,morocco,iraq,greenland,paraguay,zimbabwe,norway,japan,germany,finland,vietnam,malaysia,cote d'ivoire,poland,oman,italy,philippines,burkina faso,new zealand,gabon,ecuador,guinea,united kingdom,uganda,ghana,romania,laos,guyana,belarus,kyrgyz,senegal,syria,cambodia,uruguay,suriname,tunisia,bangladesh,nepal,tajikistan,greece,nicaragua,north korea,malawi,eritrea,benin",',')[[1]],c(17098250,9984670,9831510,9562911,8515770,7741220,3287259,2780400,2724902,2686860,2381740,2149690,1964380,1910931,1879358,1759540,1745150,1564120,1285220,1284000,1267000,1246700,1240190,1219090,1141749,1104300,1098580,1030700,1001450,947300,923770,912050,824290,799380,796100,785350,756096,752610,676590,652860,644330,637660,622980,603550,587295,581730,580370,549087,527970,513120,505940,488100,475440,462840,447420,447400,446550,435050,410450,406752,390760,385178,377962,357380,338420,330967,330800,322460,312680,309500,301340,300000,274220,267710,267670,256370,245860,243610,241550,238540,238390,236800,214970,207600,199949,196710,185180,181040,176220,163820,163610,147630,147180,141376,131960,130370,120540,118480,117600,114760))

Try it online!

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.