首页 > 试题广场 >

判断数字位置

[编程题]判断数字位置
  • 热度指数:7237 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 32M,其他语言64M
  • 算法知识视频讲解
根据输入的字符串判断字符串中数字的位置

输入描述:
输入第一行表示测试用例的个数m,接下来m行每行以个字符串,字符串长度不超过50。


输出描述:
输出m行。每行输出一行数字,用空格隔开,按顺序表示字符串中出现的数字的位置。
示例1

输入

1
a3b4c5

输出

2 4 6
头像 河大食神
发表于 2023-03-16 21:29:59
#include <iostream> #include <string> using namespace std; int main() { int n;cin>>n; while (n--) { string s; cin&g 展开全文
头像 用户抉择
发表于 2021-03-10 20:30:35
#include <stdio.h> #include <string.h> int main() {     int n,i,len,j;     cha 展开全文
头像 也不容易的小白菜很怕黑
发表于 2023-03-30 18:42:30
#include<stdio.h> #define maxsize 1000 int main() { char string[maxsize][50]; int m; scanf("%d", &m); for (int i = 0; i < m; 展开全文
头像 笑川不吃香菜
发表于 2024-03-20 09:12:41
#include <cctype> #include <iostream> using namespace std; int main() { int n;cin>>n; while(n--){ string s;cin>& 展开全文
头像 踏实的布莱恩在做测评
发表于 2024-03-21 12:02:17
#include <bits/stdc++.h> using namespace std; int main() { int m; cin>>m; while (m--) { string str; cin>&g 展开全文
头像 茶叶蛋漏了
发表于 2022-04-04 13:44:39
#include<iostream> #include<string> #include<cstdio> using namespace std; int main() { int n; cin>>n; getchar(); string s 展开全文
头像 陶良策
发表于 2025-03-05 13:36:49
#include <iostream> using namespace std; int main() { string s; int m; while (cin >> m) { // 注意 while 处理多个 case for ( 展开全文

问题信息

上传者:小小
难度:
42条回答 6382浏览

热门推荐

通过挑战的用户

查看代码
判断数字位置