求好手,一个自动分析出手机号类型的算法(AAAA ABAB等,详细见帖子)

WBOY
Release: 2016-06-13 11:20:24
Original
1443 people have browsed it

求高手,一个自动分析出手机号类型的算法(AAAA ABAB等,详细见帖子)
类型分为:AAAAA     AAAA     AAA     AABBCC     AABB     AAABBB     AABBB     AAABB     ABABAB     ABAB     AAAAB     升序ABCD     降序DCBA

我通过文本(手机号一个一行)将一组手机号导入到数据库里,需写一个算法,可以得到手机号的类型如手机号(15836998812)这样的为AABB(因为有9988是AABB型的,只要是两个相同的连在一起就可以如1133也是AABB的),15836888812,这样的就是AAAA型的,一共分为
AAAAA型的(如:15836999992,判断依据:99999)
AAAA型的(如:158365111152,判断依据:1111)
AAA型的(如:15836222712,判断依据:222)
AABBCC型的(如:15877889912,判断依据:778899)
AABB型的(如:15866779912,判断依据:6677)
AAABBB型的(如:15811122212,判断依据:111222)
AABBB型的(如:15855666212,判断依据:55666)
AAABB型的(如:15811122712,判断依据:11122)
ABABAB型的(如:15823232312,判断依据:22323)
ABAB型的(如:15836368963,判断依据:3636)
AAAAB(如:15811112569,判断依据:11112)
升序ABCD(如:158123478963,判断依据:1234)
降序DCBA(如:15843215698,判断依据:4321)


------解决方案--------------------
7楼不错,学习啦
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!