2017年8月23日

LeetCode: 620 Not Boring Movies(easy)

摘要: 题目: X city opened a new cinema, many people would like to go to this cinema. The cinema also gives out a poster indicating the movies’ ratings and des 阅读全文

posted @ 2017-08-23 15:11 玲珑子 阅读(317) 评论(0) 推荐(0) 编辑

C++: 其他类型转string

摘要: 1.to_string函数 C++11新增的函数,c++11标准增加了全局函数std::to_string,以及std::stoi/stol/stoll等等函数(string转int,long,以及long long) string to_string (int val);string to_str 阅读全文

posted @ 2017-08-23 14:50 玲珑子 阅读(624) 评论(0) 推荐(0) 编辑

LeetCode: 412 Fizz Buzz(easy)

摘要: 题目: Write a program that outputs the string representation of numbers from 1 to n. But for multiples of three it should output “Fizz” instead of the n 阅读全文

posted @ 2017-08-23 14:45 玲珑子 阅读(127) 评论(0) 推荐(0) 编辑

LeetCode: 344 Reverse String

摘要: 题目: Write a function that takes a string as input and returns the string reversed. Example:Given s = "hello", return "olleh". 代码: 自己的: 1 class Solutio 阅读全文

posted @ 2017-08-23 11:24 玲珑子 阅读(116) 评论(0) 推荐(0) 编辑

导航