Created
December 9, 2014 10:33
-
-
Save lethe2211/45141c32ab678f672db1 to your computer and use it in GitHub Desktop.
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
#! /usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import os | |
import sys | |
class Hoge(object): | |
def __init__(self): | |
pass | |
def func(self): | |
''' | |
insert your code | |
''' | |
n = input() | |
a = input() | |
b = input() | |
c = input() | |
order = list(reversed(sorted([a, b, c]))) | |
count = 0 | |
time = 0 | |
for i in range(1001): | |
# print count, time | |
num = i % 3 | |
count += order[num] | |
time += 1 | |
if count >= n: | |
break | |
print time | |
return None | |
if __name__ == '__main__': | |
h = Hoge() | |
h.func() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment