您当前的位置: 首页 > 

星夜孤帆

暂无认证

  • 2浏览

    0关注

    626博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

2018校招真题编程学习

星夜孤帆 发布时间:2019-05-15 20:45:21 ,浏览量:2

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
 
public class Main {
    public static void main(String[] args) throws NumberFormatException, IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        br.readLine();
        String[] A = br.readLine().split(" ");
        StringBuilder B = new StringBuilder();
        for(int i=A.length-1; i>=0; i-=2){
            B.append(A[i]).append(" ");
        }
        for(int i=(A.length & 1) == 1 ? 1 : 0; i arr[j + 1]) {
                    int temp = arr[j];
                    arr[j] = arr[j + 1];
                    arr[j + 1] = temp;
                }
            }
        }
        System.out.println(Arrays.toString(arr));
    }

    public static void main(String[] args) {
        int[] arr = new int[]{3,2,1};
        BubbleSort(arr);
    }
}
public class Singleton {

    private volatile static Singleton instance = null;

    public static Singleton getInstance() {
        if (instance == null) {
            synchronized (Singleton.class) {
                if (instance == null) {
                    instance = new Singleton();
                }
            }
        }
        return instance;
    }

    public static void main(String[] args) {
        Singleton instance = getInstance();
        System.out.println(instance);
    }
}
import java.io.BufferedReader;
import java.io.InputStreamReader;
 
public class Main {
    public static int maxDays(String[] sa) {
        int x = Integer.parseInt(sa[0]);
        int f = Integer.parseInt(sa[1]);
        int d = Integer.parseInt(sa[2]);
        int p = Integer.parseInt(sa[3]);
        if(d/x             
关注
打赏
1636984416
查看更多评论
0.0414s