Advertisement
heranchris0430

Online Judge Beginner-B836

Mar 21st, 2017
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.44 KB | None | 0 0
  1. // ConsoleApplication3.cpp : 定義主控台應用程式的進入點。
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include <iostream>
  6. #include <stdlib.h>
  7.  
  8. using namespace std;
  9.  
  10. int main()
  11. {
  12.     int i = 1,m = 0,n = 0;
  13.  
  14.     while (1) {
  15.         cin >> m >> n;
  16.  
  17.         while (i <= m) {
  18.             i += n;
  19.         }
  20.  
  21.         i -= n;
  22.  
  23.         cout << endl;
  24.  
  25.         if (i != m)
  26.             cout << "LOSER";
  27.  
  28.         if (m == i)
  29.             cout << "VICTORY";
  30.        
  31.         system("PAUSE");
  32.         system("CLS");
  33.     }
  34.     return 0;
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement