- Courier
- Courier-Bold
- Courier-Oblique
- Courier-BoldOblique
- Helvetica
- Helvetica-Bold
- Helvetica-Oblique
- Helvetica-BoldOblique
- Times-Roman
- Times-Bold
This file contains 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
def trailing_zeroes(n): | |
# 0s are produced when 2 and 5 are multiplied | |
# so you'll need to count how many 2s and 5s are there | |
# 2s are always more than 5s so count just 5s | |
res = 0 | |
k = 5 | |
# find all powers of 5 | |
# 25 has 2 5s, 125 has 3 5s, etc | |
while k <= n: |
This file contains 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
n,t = map(int,input().split()) | |
s = str(input()) | |
l = list(s) | |
z = len(s) - 1 | |
for i in range(t): | |
for a in range(z): | |
if l[a]=='B' and l[a+1]=='G': | |
l[a] = 'G' | |
l[a+1] = 'B' |
This file contains 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 random | |
t = str(random.randint(1000,9999)) | |
def check(): | |
k = str(input("Enter a four digit number : ")) | |
if k == t: | |
print("Correct : Game Over") | |
return | |
elif k != t: |
This file contains 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
def stringPatternSearch(text,pattern): | |
n = len(text) | |
m = len(pattern) | |
count = 0 | |
for i in range(n - m + 1): | |
for j in range(m): | |
if pattern[j] != text[i+j]: | |
break | |
if j == m-1 : | |
count = count + 1 |
This file contains 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
n = int(input()) | |
# Part 1 | |
for i in range(n): | |
s = [] | |
for j in range(n): | |
if i+j-n >= 0: | |
s.append(str(i+j-n)) | |
else: | |
s.append(" ") | |
t = s[::-1] |
This file contains 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
k,n,w = str(input()).split() | |
k = int(k) | |
n = int(n) | |
w = int(w) | |
mn = 0 | |
for i in range(w): | |
mn = mn + (i+1)*k | |
if n<mn: | |
print(mn-n) | |
else: |
This file contains 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
# This is a "dynamic programming" (aka dp) question and the solution is "recursive" | |
# Using loop to make the code run until provided non-acceptable input | |
while True: | |
n = str(input()) | |
# check if given no is zero | |
if n == "0": | |
break | |
dp = [] | |
# Make an array with a length len(n)+1 with each element as zero | |
# We will use this array |
This file contains 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
t = int(input()) | |
while(t>0): | |
t = t - 1 | |
n = int(input()) | |
if(n==1) : | |
print(1) | |
continue | |
if(n%2==0): | |
print(int(n/2)) | |
continue |
This file contains 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
"""Autogenerated input type of AcceptTopicSuggestion""" | |
input AcceptTopicSuggestionInput { | |
"""The Node ID of the repository.""" | |
repositoryId: ID! | |
"""The name of the suggested topic.""" | |
name: String! | |
"""A unique identifier for the client performing the mutation.""" | |
clientMutationId: String |