12 hour clock Multiplication - GeeksforGeeks
/*
http://ideone.com/NzL6KP
http://www.practice.geeksforgeeks.org/problem-page.php?pid=981
*/
#include <iostream>
using namespace std;
int main() {
// your code goes here
int t, x, y;
cin >> t;
while(t--){
cin >> x >> y;
int res = x * y;
if(res >= 12){
res = res % 12;
}
cout << res << endl;
}
return 0;
}