Skip to content

Instantly share code, notes, and snippets.

@poanchen
Created February 5, 2018 09:21
Show Gist options
  • Save poanchen/f52a4638c0d675689c181dbc1f1a6c33 to your computer and use it in GitHub Desktop.
Save poanchen/f52a4638c0d675689c181dbc1f1a6c33 to your computer and use it in GitHub Desktop.
A python script that will find the latest java program compile and execute them
import os
i = 12
while os.path.exists("./Solution" + str(i) + ".java"):
i += 1
i -= 1
os.system("javac Solution" + str(i) + ".java")
os.system("java Solution" + str(i))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment