Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

codeforces - 570b python

sizeOfRange,otherpick=map(int,input().split())
if(sizeOfRange==1 and otherpick==1):
    print(sizeOfRange)#1 number cant really fight can you
else:
    if(sizeOfRange/2<otherpick):
        print(otherpick-1)
    else:
        print(otherpick+1)
#so in a show of guessing the price of a object
#there is only 2 contestent
#price of the product 100
#first person says the price is 50 you just say its 50+1 or and you win
#you can say its 50-1
#either way its 50/50 chance of wining
Comment

PREVIOUS NEXT
Code Example
Python :: pandas select column by index 
Python :: Write multiple DataFrames to Excel files 
Python :: Can only use .str accessor with string values! 
Python :: numpy series reset index 
Python :: flask import jsonify 
Python :: print bold text python 
Python :: factors addition in pyhone 
Python :: regex python multiline 
Python :: python replace newline 
Python :: serializers.py include all fields 
Python :: how to rearrange list in python 
Python :: python 3 of 4 conditions true 
Python :: subprocess the system cannot find the file specified 
Python :: how to convert list to tensor pytorch 
Python :: dont filter= true in scrapy 
Python :: python open dicom 
Python :: python seconds counter 
Python :: python saveAsTextFile 
Python :: what is actually better duracell or energizer 
Python :: openpyxl delete rows 
Python :: pandas read csv unamed:o 
Python :: # find the common elements in the list. 
Python :: howt to make caluclator in python 
Python :: list to string python 
Python :: delete row from dataframe python 
Python :: adaptive thresholding with opencv python 
Python :: how to slice odd index value from a list in python using slice function 
Python :: get number of string python 
Python :: how to change the window colour in pygame 
Python :: how to add a number to a variable in django template 
ADD CONTENT
Topic
Content
Source link
Name
6+3 =