結果

問題 No.2268 NGワード回避
ユーザー chro_96
提出日時 2023-04-14 21:35:05
言語 C
(gcc 13.3.0)
結果
AC  
実行時間 5 ms / 2,000 ms
コード長 329 bytes
コンパイル時間 218 ms
コンパイル使用メモリ 28,544 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-10-10 12:17:41
合計ジャッジ時間 2,085 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 52
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>

int main () {
  int n = 0;
  char ng[1001] = "";
  
  int res = 0;
  
  char ans[1001] = "";
  
  res = scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    res = scanf("%s", ng);
    ans[i] = 'a';
    if (ng[i] == 'a') {
      ans[i] = 'b';
    }
  }
  
  ans[n] = '\0';
  printf("%s\n", ans);
  return 0;
}
0