POTATO - Ăn khoai

Tác giả: flashmt

Ngôn ngữ: C++

#include<iostream>
#include<string>
using namespace std;
int main()
{
    string s;
    int n;
    while (1) 
    {
          cin >> s;
          if (s=="[END]") return 0;
          if (s=="[CASE]") 
          {
              cin >> n;
              if ((n%5==0)||(n%5==2)) cout << "Hanako" << endl;
              else cout << "Taro" << endl;
          }
    }
    return 0;
}

Download