horiuchi #4188(2007/11/18 04:17 GMT) [ Java ] Rating0/0=0.00
Javaのprintfを使って書いてみました。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
public class Answer81 { public static void main(String[] args) { String format = String.format("%%0%dd:%%s%%n", args[1].length()); for (int index = Integer.parseInt(args[0]), end = Integer.parseInt(args[1]); index <= end; index++) { String value = ""; for (int keyIndex = 2; keyIndex < args.length; keyIndex += 2) { if (index % Integer.parseInt(args[keyIndex]) == 0) { value += args[keyIndex + 1]; } } if (value.length() == 0) { value = "hoge"; } System.out.format(format, index, value); } } }
Rating0/0=0.00-0+
[ reply ]
horiuchi
#4188()
[
Java
]
Rating0/0=0.00
Javaのprintfを使って書いてみました。
Rating0/0=0.00-0+
[ reply ]