提交时间:2024-08-21 10:40:59

运行 ID: 175754

#include <bits/stdc++.h> using namespace std; inline bool IsNumber(char c) { return (c>='0' && c<='9'); } int main() { char c; int n; scanf("%d",&n); getchar(); for(int i=1; i<=n; i++) do { int num=0; while(IsNumber(c=getchar())) num=num*10+c-'0'; cout<<num<<' '; }while(c!='\n'); return 0; }