fork download
  1. import java.util.*;
  2. import java.lang.*;
  3. import java.io.*;
  4.  
  5. class Ideone
  6. {
  7. public static void main (String[] args) throws java.lang.Exception
  8. {
  9. Scanner sc = new Scanner(System.in);
  10. int tempDay;
  11. String [] splitted;
  12. String tempMonth;
  13. while(sc.hasNext()){
  14. splitted = sc.nextLine().split(" ");
  15. tempDay = Integer.parseInt(splitted[0]);
  16. tempMonth = splitted[1];
  17. System.out.println(tempDay + "," + tempMonth);
  18. }
  19. }
  20. }
Success #stdin #stdout 0.1s 2841600KB
stdin
14 Февраля
10 Декабря
22 Июня
stdout
14,Февраля
10,Декабря
22,Июня