Skip to content

Instantly share code, notes, and snippets.

View brockthebear's full-sized avatar
💭
Ship Ship Ship

Brock Boren brockthebear

💭
Ship Ship Ship
View GitHub Profile
import sys
i = 4
d = 4.0
s = 'HackerRank '
# Declare second integer, double, and String variables.
# Read and save an integer, double, and String to your variables.
my_int = int(sys.stdin.readline())
my_dbl = float(sys.stdin.readline())
package main
import (
"fmt"
"os"
"io"
)
func main() {
fmt.Printf("%s\n", "Hello, World.")
import sys
def get_total_cost_of_meal():
# original meal price
meal_cost = float(sys.stdin.readline())
# tip percentage
tip_percent = int(sys.stdin.readline())
# tax percentage
tax_percent = int(sys.stdin.readline())
#!/bin/python3
import sys
N = int(input().strip())
if (N % 2 != 0) or (N % 2 == 0 and 6 <= N <= 20):
print('Weird')
else:
print('Not Weird')
class Person:
def __init__(self,initialAge):
# Add some more code to run some checks on initialAge
if initialAge < 0:
self.age = 0
print('Age is not valid, setting age to 0.')
self.age = initialAge
def amIOld(self):
#!/bin/python3
import sys
n = int(input().strip())
for x in range(1, 11):
print("{} x {} = {}".format(n, x, n*x))
import sys
t = int(sys.stdin.readline())
for i in range(0, t):
arg = sys.stdin.readline()
even = []
odd = []
for x in range(0, len(arg)):
n = int(input())
book = dict(input().split() for _ in range(n))
while(1):
try:
person = input()
if person in book:
print('%s=%s' % (person, book[person]))
else:
print('Not found')
#!/bin/python3
import sys
n = int(input().strip())
arr = [int(arr_temp) for arr_temp in input().strip().split(' ')]
print(' '.join(map(str,reversed(arr))))
n = int(input())
def factorial(n):
if n == 0:
return 1
else:
return n * factorial(n-1)
print(factorial(n))