結果

問題 No.1335 1337
ユーザー kekenx
提出日時 2024-01-09 12:24:13
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 400 bytes
コンパイル時間 892 ms
コンパイル使用メモリ 76,688 KB
最終ジャッジ日時 2025-02-18 16:42:07
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <cassert>
#include <map>

using namespace std;

int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);

  string A, S; cin >> A >> S;
  map<int, char> mp;
  for (int i = 0; i < A.size(); i++) mp[i] = A[i];
  for (int i = 0; i < S.size(); i++) {
    int d = S[i] - '0';
    if (d >= 0 && d <= 9) {
      S[i] = mp[d];
    }
  }
  cout << S << endl;
  return 0;
}
0