by@kuromunori
WA
1390ms
$a =[int](Read-Host) $b =[int](Read-Host) $c =[int](Read-Host) $d =[int](Read-Host) foreach($i in 0..2){ $b[$i]-=$a[$i] $c[$i]-=$a[$i] $d[$i]-=$a[$i] } echo($b[0]) echo($c[1]) echo($d[2]) echo(($b[0]*$c[1]))
97 19 02 41 15 09 13 45 86 53 94 96
97 19 02 41 15 09 13 45 86 53 94 96
Cannot convert value "97 19 02" to type "System.Int32". Error: "Input string was not in a correct format." At line:1 char:1 + $a =[int](Read-Host) + ~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidArgument: (:) [], RuntimeException + FullyQualifiedErrorId : InvalidCastFromStringToInteger Cannot convert value "41 15 09" to type "System.Int32". Error: "Input string was not in a correct format." At line:2 char:1 + $b =[int](Read-Host) + ~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidArgument: (:) [], RuntimeException + FullyQualifiedErrorId : InvalidCastFromStringToInteger Cannot convert value "13 45 86" to type "System.Int32". Error: "Input string was not in a correct format." At line:3 char:1 + $c =[int](Read-Host) + ~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidArgument: (:) [], RuntimeException + FullyQualifiedErrorId : InvalidCastFromStringToInteger Cannot convert value "53 94 96" to type "System.Int32". Error: "Input string was not in a correct format." At line:4 char:1 + $d =[int](Read-Host) + ~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidArgument: (:) [], RuntimeException + FullyQualifiedErrorId : InvalidCastFromStringToInteger Cannot index into a null array. At line:6 char:1 + $b[$i]-=$a[$i] + ~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : NullArray Cannot index into a null array. At line:7 char:1 + $c[$i]-=$a[$i] + ~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : NullArray Cannot index into a null array. At line:8 char:1 + $d[$i]-=$a[$i] + ~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : NullArray Cannot index into a null array. At line:6 char:1 + $b[$i]-=$a[$i] + ~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : NullArray Cannot index into a null array. At line:7 char:1 + $c[$i]-=$a[$i] + ~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : NullArray Cannot index into a null array. At line:8 char:1 + $d[$i]-=$a[$i] + ~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : NullArray Cannot index into a null array. At line:6 char:1 + $b[$i]-=$a[$i] + ~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : NullArray Cannot index into a null array. At line:7 char:1 + $c[$i]-=$a[$i] + ~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : NullArray Cannot index into a null array. At line:8 char:1 + $d[$i]-=$a[$i] + ~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : NullArray Cannot index into a null array. At line:10 char:1 + echo($b[0]) + ~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : NullArray Cannot index into a null array. At line:11 char:1 + echo($c[1]) + ~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : NullArray Cannot index into a null array. At line:12 char:1 + echo($d[2]) + ~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : NullArray Cannot index into a null array. At line:13 char:1 + echo(($b[0]*$c[1])) + ~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : NullArray