I’m new to Codingame and even though I already solved a couple puzzles, I still have a hard time understanding the inputs of the game.
For instance, in the puzzle I’m currently solving, the console looks like this:
> import sys > import math > # Auto-generated code below aims at helping you parse > # the standard input according to the problem statement. > n = int(raw_input()) # Number of elements which make up the association table. > q = int(raw_input()) # Number Q of file names to be analyzed. > for i in xrange(n): > # ext: file extension > # mt: MIME type. > ext, mt = raw_input().split() > for i in xrange(q): > fname = raw_input() # One file name per line.
How am I reading this? Are ‘ext’ and ‘mt’ the keys of a dictionary, and if not how can I isolate them into one? If I call xrange(n), will that call n then ext and mt on separate lines, or only ext and mt?
The game description helps understand what all the variables refer to, however I still struggle to visualize what I’m starting with. Any advice on how to get better at this?
Thanks a ton !