結果

問題 No.1943 消えたAGCT(1)
ユーザー osk_x64
提出日時 2022-05-20 21:29:55
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 15 ms / 2,000 ms
コード長 450 bytes
コンパイル時間 4,015 ms
コンパイル使用メモリ 251,564 KB
最終ジャッジ日時 2025-01-29 10:08:24
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 27
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#include <atcoder/all>
using namespace atcoder;
#define ALL(obj) (obj).begin(), (obj).end()
#define rALL(obj) (obj).rbegin(), (obj).rend()
using ll = long long;

const int INF = 1 << 30;

int main() {
  int N;
  string S;
  cin >> N >> S;

  int ans = 0;
  for (int i = 0; i < N; i++) {
    if(S[i] == 'A' || S[i] == 'G' || S[i] == 'C' || S[i] == 'T') ans = i+1;
  }

  cout << ans << endl;
  return 0;
}
0