You are viewing a single comment's thread. Return to all comments →
import java.math.BigDecimal; import java.util.*; class Solution{
public static void main(String []args){ //Input Scanner sc= new Scanner(System.in); int n=sc.nextInt(); String []s=new String[n+2]; for(int i=0;i<n;i++){ s[i]=sc.next(); } sc.close();
for (int i=n; i>=0; i--) { for (int j=0; j
if (numA.compareTo(numB) == -1) { String tmp = s[j]; s[j] = s[j+1]; s[j+1] = tmp; } } } //Output for(int i=0;i<n;i++) { System.out.println(s[i]); } }
}
Seems like cookies are disabled on this browser, please enable them to open this website
Java BigDecimal
You are viewing a single comment's thread. Return to all comments →
import java.math.BigDecimal; import java.util.*; class Solution{
for (int i=n; i>=0; i--) { for (int j=0; j
}