Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
119651 蔡胤泽 11石头剪刀布 C++ Accepted 1 MS 280 KB 398 2025-05-18 10:55:27

Tests(10/10):


Code:

#include <bits/stdc++.h> using namespace std; int judge(int a, int b) { if (a == b) return 0; if ((a == 0 && b == 1) || (a == 1 && b == 2) || (a == 2 && b == 0)) return 1; return 2; } int main() { int a, b; cin >> a >> b; int res = judge(a, b); if (res == 0) cout << "draw/tie" << endl; else cout << "winner:" << res << endl; return 0; }