Beat It !!!
Time Limit: 1 sec
Mr. Heartbeat beats once in every M seconds. And in every N seconds he beats twice. If you have T seconds tell me how many times Mr. Heartbeat will beat??
The input file contains several lines. Each line contains 3 integer numbers M (0 < M<=10), N (0 < N<=100) and T (0 < T<=1000). T is divisible by M and N and N is larger than M. Input file is terminated by end of file (EOF).
For each line of input output will print the number of heart beats in a separate line.
2 5 10
10 20 100
Problem Setter: Samia Safa Ahmed