随笔分类 -  PAT乙级练习题(Nowcoder)

摘要:1 #include 2 using namespace std; 3 4 int main() 5 { 6 int n, e; 7 bool flag = false; 8 while (cin >> n >> e) 9 { 10 if (n*e) 11 { 12 if (flag) ... 阅读全文
posted @ 2018-03-08 16:26 ouyang_wsgwz 阅读(145) 评论(0) 推荐(0) 编辑
摘要:1 #include 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 8 int main(){ 9 10 string Word; 11 char ch[100]; 12 gets(ch); 13 stringstream ss(ch); 1... 阅读全文
posted @ 2018-03-08 16:21 ouyang_wsgwz 阅读(111) 评论(0) 推荐(0) 编辑
摘要:1 #include 2 #include 3 using namespace std; 4 5 const int maxn = 105; 6 int a[maxn]; 7 8 int main(){ 9 10 int n, m; 11 cin >> n >> m; 12 for (int i = 0; i > a[(i + m) % n];... 阅读全文
posted @ 2018-03-08 16:07 ouyang_wsgwz 阅读(114) 评论(0) 推荐(0) 编辑
摘要:1 #include 2 using namespace std; 3 4 bool isprime(int n){ 5 if (n > n; 15 for (int i = 1; i <= n; i++){ 16 if (isprime(i)){ 17 if (i - lastprime == 2) sum++; 18 ... 阅读全文
posted @ 2018-03-07 22:49 ouyang_wsgwz 阅读(157) 评论(0) 推荐(0) 编辑
摘要:1 #include 2 3 int main(){ 4 int n; 5 scanf("%d", &n); 6 int b = n / 100; 7 int s = n / 10 % 10; 8 int g = n % 10; 9 for (int i = 0; i < b; i++){ 10 printf(... 阅读全文
posted @ 2018-03-07 22:48 ouyang_wsgwz 阅读(152) 评论(0) 推荐(0) 编辑
摘要:1 #include 2 #include 3 using namespace std; 4 5 int main(){ 6 int hash[10000] = { 0 }; 7 int x, n, a[110], num = 0; 8 cin >> x; 9 for (int i = 0; i> a[i]; 11 n = ... 阅读全文
posted @ 2018-03-07 22:45 ouyang_wsgwz 阅读(129) 评论(0) 推荐(0) 编辑
摘要:1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 7 struct Node 8 { 9 string name; 10 string id; 11 int score; 12 }; 13 const int maxn = 1005; 14 15 boo... 阅读全文
posted @ 2018-03-07 22:37 ouyang_wsgwz 阅读(126) 评论(0) 推荐(0) 编辑
摘要:1 #include 2 #include 3 int main() 4 { 5 char s[1001]; 6 int i, n, a, b, c; 7 char *p; 8 scanf("%d", &n); 9 for (i = 0; i0 && c == a*b){ 39 printf("Y... 阅读全文
posted @ 2018-03-07 22:31 ouyang_wsgwz 阅读(122) 评论(0) 推荐(0) 编辑
摘要:1 #include 2 #include 3 #include 4 using namespace std; 5 const int maxn = 15; 6 string a; 7 char s[maxn][maxn] = { "ling", "yi", "er", "san", "si", "wu", "liu", "qi", "ba", "jiu" }; 8 int... 阅读全文
posted @ 2018-03-07 22:21 ouyang_wsgwz 阅读(154) 评论(0) 推荐(0) 编辑
摘要:1 #include 2 #include 3 using namespace std; 4 5 int main(){ 6 7 int n; 8 while (cin >> n){ 9 int ans = 0; 10 while (n != 1){ 11 if (n % 2 == 0) 1... 阅读全文
posted @ 2018-03-06 21:54 ouyang_wsgwz 阅读(106) 评论(0) 推荐(0) 编辑
摘要:1 #include 2 #include 3 using namespace std; 4 5 int main(){ 6 int n, m; 7 while (cin >> n >> m){ 8 int ans = 0; 9 for (int i = 2; i <= n; i++){ 10 ans... 阅读全文
posted @ 2018-03-06 21:36 ouyang_wsgwz 阅读(138) 评论(0) 推荐(0) 编辑
摘要:1 #include 2 #include 3 #include 4 using namespace std; 5 6 int main(){ 7 string a; 8 while (cin >> a){ 9 int i, j, max = 0, num[10] = { 0 }; 10 for (i = 0; imax)... 阅读全文
posted @ 2018-03-06 21:25 ouyang_wsgwz 阅读(119) 评论(0) 推荐(0) 编辑
摘要:1 #include 2 #include 3 #include 4 using namespace std; 5 6 string a = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; 7 string b = "VWXYZABCDEFGHIJKLMNOPQRSTU"; 8 9 int main(){ 10 11 string s; 12 ... 阅读全文
posted @ 2018-03-06 21:21 ouyang_wsgwz 阅读(133) 评论(0) 推荐(0) 编辑
摘要:现在这里膜一下dalao 阅读全文
posted @ 2018-03-06 21:15 ouyang_wsgwz 阅读(90) 评论(0) 推荐(0) 编辑
摘要:1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 7 const int maxn = 10000 + 5; 8 char a[maxn], b[maxn]; 9 int s[30]; 10 11 int main(){ 12 13 while (~scanf("%s ... 阅读全文
posted @ 2018-03-06 20:57 ouyang_wsgwz 阅读(127) 评论(0) 推荐(0) 编辑
摘要:这问题又是一道大数的题目,学好python真重要,这是python2.7.3 阅读全文
posted @ 2018-03-06 20:44 ouyang_wsgwz 阅读(115) 评论(0) 推荐(0) 编辑
摘要:1 #include 2 #include 3 using namespace std; 4 5 int main(){ 6 int n, a, b; 7 while (cin >> a >> b >> n){ 8 int Integer = a / b; 9 cout << Integer << "."; 10 ... 阅读全文
posted @ 2018-03-06 19:30 ouyang_wsgwz 阅读(143) 评论(0) 推荐(0) 编辑
摘要:用python真是很简单,直接排序,然后判断a+b是否大于c,python在处理大数的时候,会自己转化为高精度运算 阅读全文
posted @ 2018-03-06 14:21 ouyang_wsgwz 阅读(128) 评论(0) 推荐(0) 编辑
摘要:1 #include 2 #include 3 using namespace std; 4 5 int main(){ 6 long long n; 7 while (cin >> n){ 8 if (n == 0){ 9 //cout = 1; i--){ 14 ans = (ans + ... 阅读全文
posted @ 2018-03-06 13:38 ouyang_wsgwz 阅读(176) 评论(0) 推荐(0) 编辑
摘要:1 #include 2 using namespace std; 3 4 int main() 5 { 6 int n, m, i; 7 long long a[25], b[25]; 8 a[0] = 1; a[1] = 1, a[2] = 2; 9 for (i = 3; i > n >> m) 18 { 19 ... 阅读全文
posted @ 2018-03-05 21:49 ouyang_wsgwz 阅读(143) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示
深色
回顶
展开