2008脚本大赛PowerShell Sudden Death Event 4解题及分析
2008-02-26 18:56
405 查看
英文题目位置: http://www.microsoft.com/technet/scriptcenter/funzone/games/games08/sdevent4.mspx
英文解题: http://www.microsoft.com/technet/scriptcenter/funzone/games/solutions08/sdsol04.mspx
题目很容易, 每次从字符串读两个数字对应的字符, 类型转换为[char]. 以来双引号保护数组时, 自动将他们连接起来就好了.
$ofs = ''
"$($str = ${C:/Scripts/numbers.txt}; for ($i = 0; $i -lt $str.Length; $i += 2) { [char] [int] $str.Substring($i, 2) })"
英文解题: http://www.microsoft.com/technet/scriptcenter/funzone/games/solutions08/sdsol04.mspx
题目很容易, 每次从字符串读两个数字对应的字符, 类型转换为[char]. 以来双引号保护数组时, 自动将他们连接起来就好了.
$ofs = ''
"$($str = ${C:/Scripts/numbers.txt}; for ($i = 0; $i -lt $str.Length; $i += 2) { [char] [int] $str.Substring($i, 2) })"
相关文章推荐
- 2008脚本大赛PowerShell Sudden Death Event 6解题及分析
- 2008脚本大赛PowerShell Sudden Death Event 7解题及分析
- 2008脚本大赛PowerShell Sudden Death Event 5解题及分析
- 2008脚本大赛PowerShell Sudden Death Event 9解题及分析
- 2008脚本大赛PowerShell高级组Event 1解题及分析
- 2008脚本大赛PowerShell高级组Event 4解题及分析
- 2008脚本大赛PowerShell初级组Event 9解题及分析
- 2008脚本大赛PowerShell高级组Event 8解题及分析
- 2008脚本大赛PowerShell高级组Event 5解题及分析
- 2008脚本大赛PowerShell高级组Event 6解题及分析
- 2008脚本大赛PowerShell高级组Event 2解题及分析
- 2008脚本大赛PowerShell高级组Event 7解题及分析
- 2008脚本大赛PowerShell高级组Event 9解题及分析
- 2008脚本大赛PowerShell初级组Event 10解题及分析
- 2008脚本大赛PowerShell高级组Event 3解题及分析
- Powershell脚本获取列表上event receiver信息并输出到一个csv文件中
- [3月28日的脚本] 修复Event ID 4107 and Event ID 11 问题 (PowerShell)
- PowerShell使用 invoke-sqlcmd 连行脚本文件,并向脚本文件存入参数
- (转)SQL Server 2008将数据导出为脚本 [SQL Server]