Skip to content

Instantly share code, notes, and snippets.

View Roasbeef's full-sized avatar
🏂
squad up 🏂

Olaoluwa Osuntokun Roasbeef

🏂
squad up 🏂
View GitHub Profile
@Roasbeef
Roasbeef / pizza.py
Created October 18, 2012 19:11 — forked from nelsonjchen/pizza.rb
ACM Micro-Challenge 1
from math import ceil
# Write a function called numPizzas, that takes the number of people present,
# the number of slices in a pizza, and the time of day, and returns the
# number of pizzas to buy (as a whole integer).
#
# Spec:
# Signature: int numPizzas(int numPeople, int slicesPerPizza, int time)
# Time is an int on 24-hour clock (0-23), e.g. 8 = 8am, 14 = 2pm
# 11 = 11am 11pm = 23