Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- http://cscircles.cemc.uwaterloo.ca/visualize#code=import+random%0A%0A%23+%D0%9F%D0%B5%D1%87%D0%B0%D1%82%D1%8C+%D0%BF%D1%80%D0%B8%D0%B3%D0%BB%D0%B0%D1%88%D0%B5%D0%BD%D0%B8%D1%8F+%D0%BA+%D0%B8%D0%B3%D1%80%D0%B5%0Aprint(%22%D0%98%D0%93%D0%A0%D0%90+%D0%A1%D0%9E+%D0%A1%D0%9F%D0%98%D0%A7%D0%9A%D0%90%D0%9C%D0%98%22)%0Aprint(%22~~~~~~~~~~~~~~~~%22)%0Aprint(%22%D0%9F%D1%80%D0%BE%D0%B8%D0%B3%D1%80%D1%8B%D0%B2%D0%B0%D0%B5%D1%82+%D1%82%D0%BE%D1%82,+%D0%BA%D1%82%D0%BE+%D0%B1%D0%B5%D1%80%D0%B5%D1%82+%D0%BF%D0%BE%D1%81%D0%BB%D0%B5%D0%B4%D0%BD%D1%8E%D1%8E+%D1%81%D0%BF%D0%B8%D1%87%D0%BA%D1%83.%22)%0A%0Arandom.seed()+%23+%D0%B1%D1%83%D0%B4%D0%B5%D0%BC+%D0%B8%D1%81%D0%BF%D0%BE%D0%BB%D1%8C%D0%B7%D0%BE%D0%B2%D0%B0%D1%82%D1%8C+%D1%81%D0%BB%D1%83%D1%87%D0%B0%D0%B9%D0%BD%D1%8B%D0%B5+%D1%87%D0%B8%D1%81%D0%BB%D0%B0%0A++++++++++++++%23+%D0%B2+%D0%9F%D0%B0%D1%81%D0%BA%D0%B0%D0%BB%D0%B5+%D1%82%D0%B0%D0%BA%D0%B0%D1%8F+%D1%81%D1%82%D1%80%D0%BE%D1%87%D0%BA%D0%B0+%D0%BD%D0%B5+%D1%82%D1%80%D0%B5%D0%B1%D1%83%D0%B5%D1%82%D1%81%D1%8F%0A%0A%23+%D0%B2%D1%81%D0%BF%D0%BE%D0%BC%D0%BE%D0%B3%D0%B0%D1%82%D0%B5%D0%BB%D1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%252d%22+%25+n)+%23+%D0%BF%D0%B5%D1%87%D0%B0%D1%82%D1%8C+%D0%BF%D0%B5%D1%80%D0%B5%D0%BC%D0%B5%D0%BD%D0%BD%D0%BE%D0%B9+n%0A++++print(%22%D0%A5%D0%BE%D0%B4%D0%B8%D1%82+%D0%B8%D0%B3%D1%80%D0%BE%D0%BA+%E2%84%96+%25d%22+%25+(abs(p+-+1)+%2B+1))%0A+++++%0A++++%23+%D0%B2%D1%8B%D0%B1%D0%B8%D1%80%D0%B0%D0%B5%D0%BC+%D0%BA%D0%B0%D0%BA+%D1%85%D0%BE%D0%B4%D0%B8%D1%82%D1%8C+%D0%B2+%D0%B7%D0%B0%D0%B2%D0%B8%D1%81%D0%B8%D0%BC%D0%BE%D1%81%D1%82%D0%B8+%D0%BE%D1%82+%D0%BD%D0%BE%D0%BC%D0%B5%D1%80%D0%B0+%D0%B8%D0%B3%D1%80%D0%BE%D0%BA%D0%B0%0A++++if+p+%3D%3D+1%3A%0A++++++++k+%3D+m%5Bi%5D%0A++++else%3A%0A++++++++k+%3D+random.randint(1,3)+++%23+%D1%81%D0%BB%D1%83%D1%87%D0%B0%D0%B9%D0%BD%D0%BE%D0%B5+%D1%86%D0%B5%D0%BB%D0%BE%D0%B5+%D1%87%D0%B8%D1%81%D0%BB%D0%BE+%D0%BE%D1%82+1+%D0%B4%D0%BE+3%0A++++++++%0A++++%23+%D0%BD%D0%B5%D0%BB%D1%8C%D0%B7%D1%8F+%D0%B2%D0%B7%D1%8F%D1%82%D1%8C+%D0%B1%D0%BE%D0%BB%D1%8C%D1%88%D0%B5,+%D1%87%D0%B5%D0%BC+%D0%BE%D1%81%D1%82%D0%B0%D0%BB%D0%BE%D1%81%D1%8C%0A++++if+k+%3E+n%3A%0A++++++++k+%3D+n%0A%0A++++print(%22%D0%9C%D0%BE%D0%B9+%D1%85%D0%BE%D0%B4%3A+%25d%22+%25+k)+%23+%D0%BF%D0%B5%D1%87%D0%B0%D1%82%D1%8C+%D0%BF%D0%B5%D1%80%D0%B5%D0%BC%D0%B5%D0%BD%D0%BD%D0%BE%D0%B9+k%0A++++n+-%3D+k%0A++++++++%0A++++p+%3D+(p+%2B+1)+%25+2+%23+%D1%81%D0%BB%D0%B5%D0%B4%D1%83%D1%8E%D1%89%D0%B8%D0%B9+%D0%B8%D0%B3%D1%80%D0%BE%D0%BA,+%0A++++++++++++++++++++%23+%D0%BE%D0%BF%D0%B5%D1%80%D0%B0%D1%86%D0%B8%D1%8F+%25+%D1%8D%D1%82%D0%BE+mod+%D0%B2+%D0%9F%D0%B0%D1%81%D0%BA%D0%B0%D0%BB%D0%B5%0A++++i+%2B%3D+1++++++++++%23+%D1%81%D0%BB%D0%B5%D0%B4%D1%83%D1%8E%D1%89%D0%B8%D0%B9+%D1%88%D0%B0%D0%B3%0A%23+%D0%BA%D0%BE%D0%BD%D0%B5%D1%86+%D1%86%D0%B8%D0%BA%D0%BB%D0%B0+%D0%B8%D0%B3%D1%80%D1%8B%0A%0A%23+%D0%BF%D0%BE%D0%B4%D0%B2%D0%BE%D0%B4%D0%B8%D0%BC+%D0%B8%D1%82%D0%BE%D0%B3%D0%B8%0Aif+(p+%3D%3D+1)%3A%0A++++print(%22%D0%92%D1%8B%D0%B8%D0%B3%D1%80%D0%B0%D0%BB+%D0%BF%D0%B5%D1%80%D0%B2%D1%8B%D0%B9!%22)%0Aelse%3A++%0A++++print(%22%D0%92%D1%8B%D0%B8%D0%B3%D1%80%D0%B0%D0%BB+%D0%B2%D1%82%D0%BE%D1%80%D0%BE%D0%B9!%22)%0A++++++%0Aprint(%22%D0%9F%D1%80%D0%BE%D0%B3%D1%80%D0%B0%D0%BC%D0%BC%D0%B0+%D0%B7%D0%B0%D0%B2%D0%B5%D1%80%D1%88%D0%B5%D0%BD%D0%B0.%22)%0A&mode=display&raw_input=&curInstr=0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement