import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
/**
* Main
*/
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader reader = new BufferedReader(new BufferedReader(new InputStreamReader(System.in)));
String msg = "";
while ((msg = reader.readLine()) != null) {
String[] msgs = msg.split(" ");
int a = Integer.parseInt(msgs[0]);
int b = Integer.parseInt(msgs[1]);
System.out.println(format(a + b));
}
reader.close();
}
public static String format(int num) {
int n = Math.abs(num);
StringBuilder sb = new StringBuilder(String.valueOf(n));
for (int i = sb.length() - 3; i > 0; i = i - 3) {
sb.insert(i, ',');
}
if (num < 0) {
sb.insert(0, '-');
}
return sb.toString();
}
}
1001A+BFormat
最新推荐文章于 2020-06-03 23:17:33 发布