結果

問題 No.1943 消えたAGCT(1)
ユーザー yukster714
提出日時 2023-05-02 23:14:39
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 15 ms / 2,000 ms
コード長 317 bytes
コンパイル時間 571 ms
コンパイル使用メモリ 72,448 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-21 10:55:33
合計ジャッジ時間 2,017 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 27
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <cmath>
using namespace std;
typedef long long ll;

bool agct(char c){
	return c=='A' or c=='G' or c=='C' or c=='T';
}

int main() {
	int n;string s;cin >>n>>s;
	int ans=0;
	for(int i=n-1;i>=0;i--)if(agct(s[i])) {
		ans=i+1;
		break;
	}
	cout<<ans<<endl;
	return 0;
}


0