1、相邻数对def st140901(): n = int(input()); list1 = list(map(int,input().split())); count = 0; for i in list1: if i+1 in list1: count = count + 1; print(count);if __name__ == '__main__': st140901()2、...
摘要由CSDN通过智能技术生成
1、相邻数对
defst140901():
n =int(input());
list1 =list(map(int,input()
1、相邻数对def st140901(): n = int(input()); list1 = list(map(int,input().split())); count = 0; for i in list1: if i+1 in list1: count = count + 1; print(count);if __name__ == '__main__': st140901()2、...