Advertisement
Guest User

Untitled

a guest
Apr 28th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. //
  2. // main.cpp
  3. // 2869-01
  4. //
  5. // Created by dhpark on 4/28/17.
  6. // Copyright © 2017 dhpark. All rights reserved.
  7. //
  8. // 달팽이는 올라가고 싶다
  9.  
  10. #include <cstdio>
  11. int A, B, V, K ;
  12. int main(int argc, const char * argv[]) {
  13. scanf("%d %d %d", &A, &B, &V);
  14. while (1) {
  15. V -= A ;
  16. K++ ;
  17. if(V <= 0) break ;
  18. V += B ;
  19. }
  20. printf("%d\n", K);
  21. return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement