zoukankan      html  css  js  c++  java
  • 数字排序

    strA="152648937"
    WScript.Echo reversestr(strA)
    Function reversestr(strT)
        Set regEx=NewRegExp
        regex.Pattern="d"
        regex.Global=True
        regex.IgnoreCase=True
        For i=0ToLen(strT)-1
            singlestr = Mid(strT,i+1,1)
            str=str & singlestr & ","
            Set exeStr = regex.Execute(singlestr)
            If regex.Test(singlestr)=FalseThen
                WScript.Echo "不是数字!"
                WScript.Quit
            EndIf
        Next
        strArr=Split(str,",")
        For i=0ToUBound(strArr)
            For j=0ToUBound(strArr)
                If strArr(i)>strArr(j) Then
                    t=strArr(i)
                    strArr(i)=strArr(j)
                    strArr(j)=t
                EndIf
            Next
        Next
        reversestr=Join(strArr,"")
    EndFunction

  • 相关阅读:
    poj 3617 Best Cow Line
    POJ 1852 Ants
    Pairs
    codility MinAbsSum
    Codeforces Beta Round #67 (Div. 2)C. Modified GCD
    timus 1018. Binary Apple Tree
    C
    HDU 1299Diophantus of Alexandria
    BZOJ2155(?) R集合 (卡特兰数)
    CSP模拟赛 number (二分+数位DP)
  • 原文地址:https://www.cnblogs.com/futrueface/p/4123227.html
Copyright © 2011-2022 走看看