Last active
August 29, 2015 14:21
-
-
Save patelkunal/6e98f79d929bebd5c8ed to your computer and use it in GitHub Desktop.
bootstrapper for writing code in code challanges
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
# all helper and main logic function goes here | |
def helper1(): | |
pass | |
def helper2(): | |
pass | |
def main(*inputs): | |
return result | |
a, b, str_input = raw_input().split() | |
# when there are only test case - means there will be inputs directly in first line | |
# convert inputs to appropriate type for better | |
a, b, str_input = int(a), int(b), str(str_input) | |
# convert or use above inputs and call main() function - var inputs is just placeholder | |
result = main(a, b, str_input) | |
print result |
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
# all helper and main logic function goes here | |
def helper1(): | |
pass | |
def helper2(): | |
pass | |
def main(*inputs): | |
return result | |
# main program starts from here | |
# when there are more that one test cases in inputs use this. | |
# read number of test cases - which will be in first line | |
no_of_tests = int(raw_input()) | |
for t in xrange(0, no_of_tests): | |
# lets assume that there are 3 values to read in next lines (for all tests) | |
# <number> <number> <string> | |
a, b, str_input = raw_input().split() | |
# convert inputs to appropriate type for better | |
a, b, str_input = int(a), int(b), str(str_input) | |
# convert or use above inputs and call main() function - var inputs is just placeholder | |
result = main(a, b, str_input) | |
print result |
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
# all helper and main logic function goes here | |
def helper1(): | |
pass | |
def helper2(): | |
pass | |
def main(*inputs): | |
return result | |
# main program starts from here | |
# when there are more that one test cases in inputs use this. | |
# read number of test cases - which will be in first line | |
no_of_tests = int(input()) | |
for t in range(0, no_of_tests): | |
# lets assume that there are 3 values to read in next lines (for all tests) | |
# <number> <number> <string> | |
a, b, str_input = input().split() | |
# convert inputs to appropriate type for better | |
a, b, str_input = int(a), int(b), str(str_input) | |
# convert or use above inputs and call main() function - var inputs is just placeholder | |
result = main(a, b, str_input) | |
print result |
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
# all helper and main logic function goes here | |
def helper1(): | |
pass | |
def helper2(): | |
pass | |
def main(*inputs): | |
return result | |
a, b, str_input = input().split() | |
# when there are only test case - means there will be inputs directly in first line | |
# convert inputs to appropriate type for better | |
a, b, str_input = int(a), int(b), str(str_input) | |
# convert or use above inputs and call main() function - var inputs is just placeholder | |
result = main(a, b, str_input) | |
print result |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment