//https://www.acmicpc.net/problem/9461 #include using namespace std; long long int p[101]; int main(){ p[1]=p[2]=p[3]=1; p[4]=p[5]=2; p[6]=3; p[7]=4; p[8]=5; p[9]=7; p[10]=9; for(int i=11; i> t; while(t-->0){ int n; cin>>n; cout
//https://www.acmicpc.net/problem/4597 #include #include using namespace std; int main(){ while(true){ string s; cin>>s; if(s[0]=='#') return 0; int l=s.size(); int one=0; bool mode=0; for(int i=0; i