結果

問題 No.1943 消えたAGCT(1)
ユーザー cho435
提出日時 2022-05-24 22:35:11
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 20 ms / 2,000 ms
コード長 279 bytes
コンパイル時間 1,804 ms
コンパイル使用メモリ 172,244 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-09-20 14:32:49
合計ジャッジ時間 3,316 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 27
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i,n) for (int i=0;i<(int)(n);i++)

int main(){
  int n;
  cin>>n;
  string s;
  cin>>s;
  set<char> st={'A','G','C','T'};
  int cn=-1;
  
  rep(i,n) if(st.count(s.at(i))) cn=i;
  cout<<cn+1<<endl;
}
0