Sample Input
2
2010/11/20-12:12:12
1970/01/01-00:01:01
Sample Output
11/20/2010-12:12:12pm
01/01/1970-12:01:01am
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
public class Main {
public static void main(String[] args) throws ParseException {
Scanner cin=new Scanner(System.in);
int t;
String str;
SimpleDateFormat sd1=new SimpleDateFormat("yyyy/MM/dd-HH:mm:ss");
t=cin.nextInt();
cin.nextLine();
while(t-->0)
{
str=cin.nextLine();
SimpleDateFormat sd2=new SimpleDateFormat("MM/dd/yyyy-hh:mm:ssa",new Locale("US"));
///h为12小时,H为24小时
System.out.println(sd2.format(sd1.parse(str)).toLowerCase());
}
cin.close();
}
}