Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //
- // main.cpp
- // 2869-01
- //
- // Created by dhpark on 4/28/17.
- // Copyright © 2017 dhpark. All rights reserved.
- //
- // 달팽이는 올라가고 싶다
- #include <cstdio>
- int A, B, V, K ;
- int main(int argc, const char * argv[]) {
- scanf("%d %d %d", &A, &B, &V);
- while (1) {
- V -= A ;
- K++ ;
- if(V <= 0) break ;
- V += B ;
- }
- printf("%d\n", K);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement