Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import sys
- import time
- import random
- if __name__ == '__main__':
- n = 0
- a = b = ""
- start_time = time.time()
- for line in sys.stdin:
- line = str(line).split(" ")
- if len(line) != 2:
- continue
- a = str(line[0])
- b = str(line[1])
- c2 = a+b
- a = b = ""
- n += 1
- end_time = time.time() - start_time
- petla_start = time.time()
- h = n;
- for i in range(0, n):
- h+= 1;
- if h > random.randrange(6,9999):
- h+=2
- petla_end = time.time()
- total_time = end_time - (petla_end-petla_start)
- print("normal concat total: " + str(total_time) + "\n")
- print("normal concat avg: " + str(total_time/n) + "\n")
- print(str(h))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement