编程介的小学生 2017-09-16 14:00 采纳率: 20.5%
浏览 632
已采纳

Floating Number Validation

Given a string, you should validate whether the string represents a legal float number. The legal float number should in this pattern: ^([+-])?(?\d*)?((.)(?\d*))?(([eE])(?[+-]?\d+))?$ Obviously if both fractional_digits and integral_digits part are empty, this string is also illegal.

Input

There are multiple test cases, each with a string in a line(no extra blanks in this string). The test cases end with a single '#' in a line.

Output

If the string represents a legal float number, output 'Yes' in a line. Otherwise output 'No'.

Sample Input

1.1e11
1.1e1.1
#
Sample Output

Yes
No

  • 写回答

1条回答 默认 最新

报告相同问题?

悬赏问题

  • ¥15 stata安慰剂检验作图但是真实值不出现在图上
  • ¥15 c程序不知道为什么得不到结果
  • ¥40 复杂的限制性的商函数处理
  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题