Read the problem. Try to solve the problem by hand using the sample input. Match your result with the sample output.
Depending on the format of the input, read in the data and save it into variables. Use lists to store multiple or collection of data. Use a loop to read repeating data.
Use dictionary to map key and value; use list to store collection of data; Use loop for repeating; Use if to process data under different conditions.