编程介的小学生 2017-10-02 15:38 采纳率: 20.5%
浏览 773
已采纳

AT – sequence

Description

AT-sequences are command strings used to control modems. An AT-sequence is a string of no more than 500 characters consisting of the prefix 'AT' followed by some commands immediately one after another without any separators. Here is a simplified description of the modem commands.

Each command consists of a header and an optional numeric value (non-negative integer containing no more than 4 digits). If there is a value in the command, it is separated from the header by the character '='.

The header itself also consists of two parts. The first, mandatory, part of a header has one of the following forms:

one or two upper-case Latin letters;
one of the symbols '&', '#', '@', followed by one upper-case Latin letter.
The second, optional part of a header is a non-negative integer containing no more than 20 digits.

Spaces are not allowed in the command notation. If the command notation contains only one or two Latin letters, this command can't precede another one with the notation started by a letter.

The task is to determine all commands included in the structure of a correct AT-sequence.

Input

The input contains one line with the source AT-sequence.

Output

Each line of the output contains one command from the AT-sequence given in the input file. The commands must be listed in the same order as in the AT-sequence. If AT-sequence have no commands you must generate nothing.

Sample Input

ATDP2934564&H0S0=4
Sample Output

DP2934564
&H0
S0=4

  • 写回答

1条回答 默认 最新

  • threenewbee 2017-10-17 17:17
    关注
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 一道python难题
  • ¥15 用matlab 设计一个不动点迭代法求解非线性方程组的代码
  • ¥15 牛顿斯科特系数表表示
  • ¥15 arduino 步进电机
  • ¥20 程序进入HardFault_Handler
  • ¥15 oracle集群安装出bug
  • ¥15 关于#python#的问题:自动化测试
  • ¥20 问题请教!vue项目关于Nginx配置nonce安全策略的问题
  • ¥15 教务系统账号被盗号如何追溯设备
  • ¥20 delta降尺度方法,未来数据怎么降尺度