图片.png
#include <iostream>
#include <stdio.h>
#include <string>
using namespace std;
int main()
{
int m;
cin >> m;
string str;
int counter;
for (int i=0;i<m;i++)
{
counter = 1;
cin >> str;
for(string::iterator j=str.begin();j!=str.end();j++)
{
if (*j==48||*j==49||*j==50||*j==51||*j==52||*j==53||*j==54||*j==55||*j==56||*j==57)
{
cout << counter <<" ";
}
counter++;
}
cout <<endl;
}
return 0;
}
网友评论