随笔分类 - 3.5.进制转换
摘要:英文题目:1100 Mars Numbers 中文题目:1044 火星数字 1 #include<iostream> 2 #include<algorithm> 3 using namespace std; 4 string hashtable1[13] = {"tret","jan", "feb"
阅读全文
摘要:坑点一:两个PAT的最高位求和,可能会产生进位carry,最好不要忘了 拼接上 carry。 坑点二:两个PAT的和 可能是 0,要特判输出 0。 #include<iostream> #include<algorithm> using namespace std; int main() { str
阅读全文
摘要:水题。 #include<iostream> #include<cctype> using namespace std; string str; int main() { getline(cin,str); int sum = 0,r ,cnt0 = 0,cnt1 = 0; for(int i =
阅读全文
摘要:水题。 #include<iostream> #include<algorithm> using namespace std; typedef long long LL; int main() { LL G1,S1,K1,G2,S2,K2; scanf("%lld.%lld.%lld %lld.%l
阅读全文
摘要:使用了STL中的stack,常用操作的时间复杂度大都是O(1)。 总体比较水。考察进制转换的除基取余法。 #include"iostream" #include<stack> using namespace std; int main() { int a,b,d,sum; cin>>a>>b>>d;
阅读全文

浙公网安备 33010602011771号