摘要: Sherlock Holmes received a note with some strange strings: Let's date! 3485djDkxh4hhGE 2984akDfkkkkggEdsb s&hgsfdk d&Hyscvnm. It took him only a minut 阅读全文
posted @ 2019-12-17 17:19 57one 阅读(127) 评论(0) 推荐(0)
摘要: If a machine can save only 3 significant digits, the float numbers 12300 and 12358.9 are considered equal since they are both saved as 0 with simple c 阅读全文
posted @ 2019-12-17 16:38 57one 阅读(180) 评论(0) 推荐(0)
摘要: 一般判断素数的方法是从2开始到sqrt(n)判断是否有数为n的因子 若有则说明该数是非素数 1 bool Is_Prime = true; 2 for (int i = 2; i * i < N; i++) 3 { 4 if (N % i == 0) 5 Is_Prime = false; 6 } 阅读全文
posted @ 2019-12-17 15:55 57one 阅读(156) 评论(0) 推荐(0)
摘要: Given any positive integer N, you are supposed to find all of its prime factors, and write them in the format N = p​1​​​k​1​​​​×p​2​​​k​2​​​​×⋯×p​m​​​ 阅读全文
posted @ 2019-12-17 15:33 57one 阅读(165) 评论(0) 推荐(0)
摘要: If you are a fan of Harry Potter, you would know the world of magic has its own currency system -- as Hagrid explained it to Harry, "Seventeen silver 阅读全文
posted @ 2019-12-17 14:27 57one 阅读(183) 评论(0) 推荐(0)
摘要: Stack is one of the most fundamental data structures, which is based on the principle of Last In First Out (LIFO). The basic operations include Push ( 阅读全文
posted @ 2019-12-17 13:44 57one 阅读(100) 评论(0) 推荐(0)