Here you can find the source of sumWithDivide(List
private static long sumWithDivide(List<Integer> okaylist, int curdiv)
//package com.java2s; //License from project: Open Source License import java.util.*; public class Main { private static long sumWithDivide(List<Integer> okaylist, int curdiv) { long t = 0L; for (int oneokay : okaylist) { t += (oneokay > curdiv ? (oneokay / curdiv) : 1); }/*from w w w . j a v a 2s . c o m*/ return t; } }