public class Solution
 {
     public static void main(String[] args)
     {
         int count = 0;
         int[] card = new int[4];
         int sum = 0;
         while(true)
         {
             sum = 0;
             for(int i = 0; i < 4; i++)
                 card[i] = (int)(Math.random() * 13 + 1);
             count++;
             for(int i: card)
                 sum += i;
             if(sum == 24)
                 break;
         }

         System.out.println("It has run " + count + " times");
     }
 }

最新文章

  1. JAVA 链表操作:循环链表
  2. HDU1215(筛选法)
  3. How to relocate tablespace directory
  4. 重构第14天 分离职责(Break Responsibilities)
  5. iOS边练边学--Http网络再学习,简单介绍
  6. Swift—类型检查与转换-备
  7. 01js高级_1
  8. js中运动框架的封装
  9. Java 第八周总结
  10. C#实现断点续传
  11. 转 Java虚拟机5:Java垃圾回收(GC)机制详解
  12. PHP7.1安装xdebug
  13. 安装Prometheus-Opeartor
  14. python 文件描述符
  15. centos FTP 用户指定目录禁用上级目录
  16. Office2013中文激活版
  17. sqlserver实现分页的几种方式
  18. C# 很少人知道的科技
  19. python3 爬虫相关-requests和BeautifulSoup
  20. io.fabric8.kubernetes对pv和pvc的增删查改

热门文章

  1. python:Attempted relative import in non-package
  2. ExtJS4 MVC开发教程:搭建开发环境
  3. 让阿里云的Centos,PHP组件 ImageMagick支持png和jpeg格式
  4. SQLite入门与分析(三)---内核概述(1)
  5. Linux如何在虚拟机中挂载iso yum源
  6. Altium Designer13 如何导出Gerber文件
  7. POJ1328——Radar Installation
  8. Flex 选项卡加载方式简介
  9. python函数--传参
  10. python操作Excel读--使用xlrd