小编Des*_*yse的帖子

填充剩余的垂直空间

重新设计我的网站,在我的CSS我有一个高度div:200px; 然后在它下面的图像高度:532px; 然后最后一个高度:100%;

最后一个div没有填写页面的其余部分,有什么我做错了吗?

PS - 所有div都在一个容器中.所有包含div的高度均为100%;

我已经改变了,所以我不再需要这个了.

css fill

2
推荐指数
1
解决办法
4790
查看次数

更有效的方法呢?

我想知道是否有更有效的方式来运行这个程序?

它适用于较低的数字,但随着时间的推移,时间也会增加 - 指数级.所以像1000000这样的数字永远都需要

import java.util.*;

public class SumOfPrimes {

public static void main(String args[]) {
    Scanner in = new Scanner(System.in);
    long number = 0;

    System.out.println("This program outputs the sum of the primes of a given number.");
    System.out.print("Please enter a number: ");
    number = in.nextLong();

    System.out.println("The sum of the primes below "+number+" is: "+sumOfPrimes(number));
}

public static long sumOfPrimes(long n){
    long currentNum = 2;
    long sum = 0;
    if (n > 2){
        sum = sum + 2;
    }

    while (currentNum …
Run Code Online (Sandbox Code Playgroud)

java sum factors

0
推荐指数
1
解决办法
98
查看次数

标签 统计

css ×1

factors ×1

fill ×1

java ×1

sum ×1