Bracket Match

2015-12-14 0 116
Bracket Match
#!/usr/bin/env perl6

use v6;

my \stdin = $*IN;

my Int $count = +stdin.get();

for ^$count {
	my Str $str = stdin.get();

	while $str.chars > 0 {
		last unless $str ~~ s:g/[ \[ \] || \( \) ]+//;
	}

	say $str.chars ?? "No" !! "Yes";
}

遇见资源网 perl Bracket Match http://www.ox520.com/13014.html

上一篇:

已经没有上一篇了!

下一篇:

已经没有下一篇了!

常见问题

相关文章

发表评论
暂无评论
官方客服团队

为您解决烦忧 - 24小时在线 专业服务