artemgf

Игра с орехами

Apr 16th, 2017
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.37 KB | None | 0 0
  1. #include <iostream>
  2. #include <conio.h>
  3. #include <math.h>
  4. #include <string>
  5. #include <algorithm>
  6. #include <set>
  7.  
  8. using namespace ::std;
  9.  
  10. int main()
  11. {
  12.     int n, turn=0;
  13.  
  14.     cin >> n;
  15.  
  16.     for (int i = 1; i <= n; i++)
  17.     {
  18.         int prom;
  19.         cin >> prom;
  20.         turn += prom/2;
  21.     }
  22.     if (turn % 2 == 0)
  23.         cout << "Stannis";
  24.     else
  25.         cout << "Daenerys";
  26.     _getch();
  27.     return 0;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment