fork download
  1. import java.util.*;
  2. import java.lang.*;
  3. import java.io.*;
  4.  
  5. class Main
  6. {
  7. public static void main (String[] args) throws java.lang.Exception
  8. {
  9. int e, f, c;
  10. Scanner in = new Scanner(System.in);
  11. e = in.nextInt();
  12. f = in.nextInt();
  13. c = in.nextInt();
  14. System.out.print((int)((e + f)/(c - 1 + 0.0001)));
  15.  
  16. }
  17. }
Success #stdin #stdout 0.06s 2184192KB
stdin
9 0 3
stdout
4