結果

問題 No.1943 消えたAGCT(1)
ユーザー kekenx
提出日時 2024-01-09 19:32:23
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 12 ms / 2,000 ms
コード長 352 bytes
コンパイル時間 866 ms
コンパイル使用メモリ 75,320 KB
最終ジャッジ日時 2025-02-18 16:56:20
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 27
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <cassert>
#include <set>

using namespace std;

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

  int n; cin >> n;
  string s; cin >> s;
  set<char> st = {'A','G','C','T'};
  int ma = 0;
  for (int i = 0; i < n; i++) {
    if (st.find(s[i]) != st.end()) ma = i + 1;
  }
  cout << ma << endl;
  return 0;
}
0