2019年1月21日

1019 General Palindromic Number

摘要: 题目大意是让你把一个数转化为给定的进制数,然后判断该进制数是否是回文串。水题~ #include <iostream> #include <cstring> #include <string> #include <sstream> #include <string> #include <cstdio 阅读全文

posted @ 2019-01-21 22:41 FTA_Macro 阅读(148) 评论(0) 推荐(0) 编辑

1152 Google Recruitment

摘要: 题目大意不难懂,在一串字符中找到第一个K位素数。 20分的题,暴力就能做。有两个小点,一个是字符串string转成数字有一个stoi函数,还有一个就是截取string字符串中某一段连续的子串可以简洁写为string ts(s,i,l),其中s是母串,i是起始位置,j是要截取的长度。 判断素数用O(√ 阅读全文

posted @ 2019-01-21 18:58 FTA_Macro 阅读(242) 评论(0) 推荐(0) 编辑

导航