[問題] leetcode 格式
大家好,最近開始預備在leetcode練習,
先挑了一個非常簡單的題目,也很快就做出要求
但發現正式提交後卻出現了Runtime error的情況,
難道說leetcode的程式編輯區格式要完整的保留嗎 ?
以下是原格式
class Solution(object):
def twoSum(self, nums, target):
"""
:type nums: List[int]
:type target: int
:rtype: List[int]
"""
我想說這程式才幾行而已幹嘛用Class 就只寫Function和輸出輸入而已
。
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 180.177.12.57
※ 文章網址: https://www.ptt.cc/bbs/Python/M.1506327353.A.DE6.html
推
09/25 18:09, , 1F
09/25 18:09, 1F
→
09/25 19:22, , 2F
09/25 19:22, 2F
→
09/25 23:28, , 3F
09/25 23:28, 3F