public static void main(String[] args) {         Scanner scanner = new Scanner(System.in);         int n = scanner.nextInt();         int i = n % 8;         if (i == 1 || i == 3 || i == 5 || i == 7) {             System.out.print(-1);         } else {             int j = n / 8;             while ((n - j * 8) % 6 != 0) {                 j--;             }             System.out.print(j + (n - j * 8) / 6);         }     }
点赞 评论

相关推荐

A_SOUL_Off...:疑似加班加出幻觉了
点赞 评论 收藏
分享
牛客网
牛客网在线编程
牛客网题解
牛客企业服务