Fenghe's Blog

Google Kick Start Round G 2019

Problems

  • Book Reading
  • The Equation
  • Shifts

Experience

I made a fatal mistake and was stuck at the first problem. It is about the language feature. I used Python 3, and firstly used round(later corrected with math.floor) by mistake, debugged for an hour, then time overs.

I have added the Kick Start Calendar into my Google Calendar and keeps track of it while practicing occasionally. The round is for 3 hours, but when I came back from a team discussion, there was only one hour left. If I were skillful enough, I should have been able to finish it. But that’s not the case, I stuck at a simple language feature.

My Submission

The following code is my submission for the first problem and it only passed one of the 2 tests, not working for the large data set.

import math
T = int(input())

for t in range(T):
    [N, M, Q] = [int(s) for s in input().split()]
    P = [int(s) for s in input().split()]
    R = [int(s) for s in input().split()]
    total = 0
    for r in R:
        total += math.floor(N / r)
        for p in P:
            if p % r == 0:
                total -= 1
                
    print("Case #{}: {}".format(t + 1, total))

Retrospection

I will try to spend at least 1 hour a day on Google Kick Start and prepare for Round H a month later.

Besides, I should set a timer for myself and try to finish every problem in 30 mins.

So, the next week, solving the Round G firstly.

Leave a Reply

Your email address will not be published. Required fields are marked *