摘要: remand = 'abaxyzzyxf' def long_palindrome(s: str) -> str: longest = '' for i in range(len(s)): for j in range(i, len(s)): substr = s[i:j + 1] if is_pa 阅读全文
posted @ 2022-12-03 23:19 ascertain 阅读(20) 评论(0) 推荐(0)
摘要: remand = [7, 10, 12, 7, 9, 13] def max_sum_no_adjacent(array): if not len(array): raise ValueError(f'array is empty') if len(array) < 3: return max(ar 阅读全文
posted @ 2022-12-03 22:02 ascertain 阅读(43) 评论(0) 推荐(0)
摘要: nested loop remand = [3, 5, -4, 8, 11, 1, -1, 6] goal = 10 def palindrome(array: list[int], goal: int) -> tuple: length = len(array) for i in range(le 阅读全文
posted @ 2022-12-03 21:28 ascertain 阅读(20) 评论(0) 推荐(0)
摘要: use rand::Rng; use std::{cmp::Ordering, io}; fn main() { println!("Hello, world!"); let secret_number = rand::thread_rng().gen_range(1, 101); println! 阅读全文
posted @ 2022-12-03 10:45 ascertain 阅读(22) 评论(0) 推荐(0)