Advertisement
arfin97

URI 1542 SOUTION. (Try na kore dekhben na apu :P)

Jun 30th, 2017
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.23 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main(){
  4.     int q, d, p;
  5.     while(scanf("%d", &q) != EOF){
  6.         if(q == 0) break;
  7.  
  8.         scanf("%d %d", &d, &p);
  9.  
  10.         int page = (p * q * d)/(p - q);
  11.  
  12.         printf("%d\n", page);
  13.     }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement