Skip to content

wfnian/leetcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

This repository include two main parts:

1.leetcode program by myself Leetcode,click to leetcode Travis (.org) branch

  1. 第一部分leetcode主要包含大部分C/Python解决方案 阶段:大一到大二

  2. 第二部分leetcodeII主要包含大部分C++解决方案 阶段: 大三

  3. 第三部分leetcodeIII主要包含大部分Java解决方案 阶段: 大三

2. oj of buct(Beijing University of chemical technology)

Tag

About Title formalize

用法一 用法二
加入 path环境变量 更加方便
#!/usr/bin/python3 
# tc.py         tc: title change
import sys
title = ""
if len(sys.argv) == 1:
        while title == "":
                title = input("please input title of LeetCode\n")
else :
	title = ' '.join(sys.argv[1:])

formal_title = title.lower().replace(
        '. ', '').replace(
        ' ', '_')
if formal_title[-3:]=='_i':
        formal_title=formal_title[:-2]+'_I'
if formal_title[-3:]=='_ii':
        formal_title=formal_title[:-3]+'_II'
if formal_title[-4:]=='_iii':
        formal_title=formal_title[:-4]+'_III'
print(formal_title)


mail:
wfnian@gmail.com
1770547906@qq.com

alt