This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from turtle import * | |
colors = ["red","orange","yellow","green","blue","purple"] | |
def move(x): | |
forward(x) | |
right(90) | |
def strip(): | |
pendown() | |
begin_fill() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math | |
def shuffleClass(array,index): | |
n = len(array) | |
if type(array)==type([]): | |
if array==[]: | |
return [] | |
else: | |
index = index % n | |
gcd = math.gcd(index,n) | |
for i in range(gcd): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# I found myself creating folders for each round and writing the same template again and again taking precious time in a CF contest | |
# so I create a script file that does the work for me within seconds | |
echo -n "Round Name:" | |
read round | |
mkdir $round | |
template="for _ in range(int(input())): | |
n = int(input()) | |
s = input() |