Skip to content

Instantly share code, notes, and snippets.

@chenhan1218
Last active September 25, 2021 22:54
Show Gist options
  • Save chenhan1218/1b023603ed80f38a49a8fbe65b2e3a34 to your computer and use it in GitHub Desktop.
Save chenhan1218/1b023603ed80f38a49a8fbe65b2e3a34 to your computer and use it in GitHub Desktop.
jam
#!/usr/bin/env python3
import random
import sys
def main():
line = sys.stdin.readline().rstrip()
line.rstrip()
T = int(line)
for case in range(1, T + 1):
line = sys.stdin.readline().rstrip()
ret = 0
print(f"Case #{case}: {ret}")
if __name__ == "__main__":
main()
#!/usr/bin/env python3
import argparse
def main(filename):
with open(filename) as f:
line = f.readline().rstrip()
T = int(line)
for case in range(1, T + 1):
line = f.readline().rstrip()
n = int(line)
ret = n
print(f"Case #{case}: {ret}")
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("-f", dest='filename', type=str, help="intput file")
args = parser.parse_args()
main(**vars(args))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment