Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

codeforces 1133A in python

sh, sm = map(int, input().split(':')) # start time
eh, em = map(int, input().split(':')) # end time

mid_m = (((sh * 60) + sm) + ((eh * 60) + em)) // 2

if mid_m >= 1440:
    mid_m = mid_m - 1440
mh = mid_m // 60
mm = mid_m - (mh * 60)

if mh < 10:
    mh = '0' + str(mh)
if mm < 10:
    mm = '0' + str(mm)
print(mh, ':', mm, sep='')
Comment

PREVIOUS NEXT
Code Example
Python :: python comment faire une boucle 
Python :: python lambda to rename multiple variables name by replacing any appearance with underscore 
Python :: linkedin python test 
Python :: how to stop a function from returning none 
Python :: lambda2 criterion python 
Python :: Use xarray to open a ncdf file 
Python :: disable chrome console errors selenium 
Python :: find all html files in a current directory using regular expression in python 
Python :: Elasticsearch scroll with Parallelism r 
Python :: Find element with class name in requests-html python 
Python :: Broadcasting with NumPy Arrays Single dimension array Example 
Python :: Python NumPy ndarray flatten Function Example 02 
Python :: df create dummy from multiple category 
Python :: sensitivity 
Python :: Python NumPy asarray_chkfinite Function Example Raises Value Error 
Python :: python function arguments multiple lines 
Python :: Python NumPy hsplit Function Syntax 
Python :: mypy run on single file 
Python :: palindrome rearrange 
Python :: print number upto 2 decimal places in f string python 
Python :: NumPy unpackbits Code Unpacked array along axis 0 
Python :: How to use "to_representation" hook for django rest serializers 
Python :: Python PEP (class) 
Python :: python replace date time column 
Python :: Use one function for the "ComboboxSelected", to read multiple combobox 
Python :: vscode show when variable is protected or private python 
Python :: block-all-mixed-content csp bypass python 
Python :: Trying to set up flask with nginx and gunicorn 
Python :: get command line variables python 
Python :: pandas maxima and minima for given column 
ADD CONTENT
Topic
Content
Source link
Name
6+8 =