参考代码:
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int x = scanner.nextInt(); if(x % 4 == 1) System.out.printf("0 1 %d", x / 4 - 1); else if(x % 4 == 2) System.out.printf("1 0 %d", x / 4 - 1); else if(x % 4 == 3) System.out.printf("1 1 %d", x / 4 - 2); else System.out.printf("0 0 %d", x / 4); } }
0.0分
6 人评分