grooy随机生成合法身份证号码的脚本

清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>

def rand = new Random()   
def w = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2]   
def v = [1, 0, 'X', 9, 8, 7, 6, 5, 4, 3, 2]   
def s = w.sum { def i = rand.nextInt(10); print i; i * it }   
println v[s % 11]