1 条题解

  • 0
    @ 2024-9-11 22:33:06
    #include <bits/stdc++.h>
    using namespace std;
    
    int main() {
      const string s = "ABCDEFGHIJ";
      char x, y;
      cin >> x >> y;
      int pos = (x - 'A') + (y - 'A');
      string ans;
      while (pos) {
        ans += s[pos % 10];
        pos /= 10;
      }
      reverse(ans.begin(), ans.end());
      if (ans.size() == 0) cout << 'A';
      else cout << ans;
      return 0;
    }
    
    • 1

    信息

    ID
    9
    时间
    1000ms
    内存
    256MiB
    难度
    4
    标签
    递交数
    63
    已通过
    30
    上传者