标签:class pre i++ name com color mic nbsp iostream
超短AC代码
压行小技巧
#include<iostream>
using namespace std;
string s;
int ans[2];
int main()
{
cin>>s;
int l=s.length();
for(int i=0;i<l;i++)
ans[(l-i)&1]+=s[i]-‘0‘;
cout<<ans[0]<<‘ ‘<<ans[1]<<endl;
return 0;
}
标签:class pre i++ name com color mic nbsp iostream
原文地址:https://www.cnblogs.com/ivanovcraft/p/9021743.html