随笔分类 - java学习
摘要:B . A prince of the Science Continent was imprisoned in a castle because of his contempt for mathematics when he was young, and was entangled in some
阅读全文
摘要:long long 范围内的开根 浮点数的开根 java 大数套牛顿迭代
阅读全文
摘要:题意:01给出一个数n,现在要将它分为m个数,这m个数相加起来必须等于n,并且要使得这m个数的或值最小。 思路分析: 一个简单的贪心,从高位到低位,判断当前位可否为 1 ,若可以,则将所有的数的这一位全部都变成 1 代码示例:
阅读全文
摘要:import java.math.*; import java.util.*; public class study { public static void main(String[] args) { // TODO Auto-generated method stub Scanner cin = new Scanner(System.in); BigInteger a, b...
阅读全文