public class Demo {
public static void main(String[] args){
fun01();
}
public static void fun01() {
java.util.Scanner sc = new java.util.Scanner(System.in);
int n = sc.nextInt();
int last = sc.nextInt(),now = last,max = 0;
for(int i = 1; i < n;) {
now = sc.nextInt();
if( now <= 0 )
continue;
i++;
max = Math.max(Math.abs(now-last),max);
last = now;
}
System.out.println( max );
}
}
欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/) | 黑马程序员IT技术论坛 X3.2 |