PAT甲级考前整理(2019年3月备考)之三,持续更新中.....
PAT甲级考前整理一: https://www.cnblogs.com/jlyg/p/7525244.html ,主要讲了131题的易错题及坑点 PAT甲级考前整理二: https://www.cnblogs.com/jlyg/p/10364696.html ,主要讲了考前注意以及一些常用算法。 1132题:用字符串接收会毕竟快,使用atoi函数转成数字,注意a*b会超出int32。 #include<iostream> #include <cstdio> #include < set > #include <map> #include <vector> #include <iterator> #include <algorithm> #include <cstring> using namespace std; int main() { #ifdef ONLINE_JUDGE #else freopen( " test.txt " , " r " ,stdin); #endif int t; scanf( " %d " ,& t); while (t-- ) { char str[ 20 ]; scanf( " %s " ,str); char str1[ 20 ],str2[ 20 ]; int len = strlen(str); strncpy(str1,str,len /