예제 #1
0
def outname(path):
	if os.path.isdir(path):
		f = path.split("/")[-1]
		return path,f
	if os.path.isfile(path):
		f = path.split("/")[0:-1]
		fs = path.split("/")[-2]
		for g in f:
			fg = g+'/'
		return fg,fs
	else: return sys.env('SKIM_MONOHIGGS_BOOSTED_FLATDIR'),"random"
예제 #2
0
                
        var count = 0
        var resultArr: Array[Int] = Array()
        
        while ( arr.length >= 1 ){
            var minVal = arr.min()
            count = arr.length()
            var arr1 = arr.map(x => x-minVal)
            resultArr = resultArr :+ count
        }   
        
        return resultArr

    }

    def main(args: Array[String]) {
        val stdin = scala.io.StdIn

        val printWriter = new PrintWriter(sys.env("OUTPUT_PATH"))

        val n = stdin.readLine.trim.toInt

        val arr = stdin.readLine.split(" ").map(_.trim.toInt)
        val result = cutTheSticks(arr)

        printWriter.println(result.mkString("\n"))

        printWriter.close()
    }
}