题解 | #判断数字位置#
判断数字位置
https://www.nowcoder.com/practice/55d5708cd4ab472b9c2969f9846f32ec
#include <cctype>
#include <iostream>
using namespace std;
int main() {
int n;cin>>n;
while(n--){
string s;cin>>s;
for(int i =0;i<s.length();i++)
if(isdigit(s[i]))
cout<<i+1<<" ";
cout<<endl;
}
}
// 64 位输出请用 printf("%lld")
isdigit