My solution for onlines judge problems