text: The most optimal way is to wait 3 seconds till 3 units of data will be downloaded and then start watching.While guys will be watching video 1 second, one unit of data will be downloaded and Valerik and Valerko will have 4 units of data by the end of watching.Also every moment till the end of video guys will have more data then necessary for watching.In the second sample guys need 2 · 10 = 20 units of data, so they have to wait 5 seconds and after that they will have 20 units before the second second ends.However, if guys wait 4 seconds, they will be able to watch first second of video without pauses, but they will download 18 units of data by the end of second second and it is less then necessary.# Solution import java.util.Scanner; public class P7 { public static void main(String[] arg) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); int tot = a*c; int cont = 0; while(tot > 0){ tot = tot -b; cont++; } tot = a*c; int f = 0; int cont2 = 0; while(f + c*b < tot){ cont2++; f=f+b; } System.out.println(cont2); } }