a lot of clock logic
Judge's test input/output
Added judges test input/output