专注于互联网--专注于架构

最新标签
网站地图
文章索引
Rss订阅
问题描述: 有两个有序整数集合a和b,写一个函数找出它们的交集? 几种解决方案: 一: import java.util.Arrays; public class Test { public static void main(String args[]){ int[] b = {4, 6, 7, 7, 7, 7, 8, 8, 9, 10, 100, 130, 130, 140, 150}; int[] a = {2, 3, 4, 4, 4, 4, 7, 8, 8, 8, 8, 9, 100, 130, 150, 160}; int[] c = inters [阅读全文] [PDF]
经常见到cint和clng的溢出出错,如果有检测函数就不会出这个问题,下面这两个函数是应朋友要求写的,看一下吧\'检测字符串是否是整数function Is_Int(a_str) if not isnumeric(a_str) or len(str) > 5 then Is_Int = false exit function elseif len(str) < 5 then Is_Int = true exit function end if if cint(left(a_str , 4)) > 3276 then I [阅读全文] [PDF]
1 共2条 分1页