結果
| 問題 | 
                            No.1943 消えたAGCT(1)
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2022-06-04 05:47:40 | 
| 言語 | C++23  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 15 ms / 2,000 ms | 
| コード長 | 215 bytes | 
| コンパイル時間 | 667 ms | 
| コンパイル使用メモリ | 78,140 KB | 
| 実行使用メモリ | 6,944 KB | 
| 最終ジャッジ日時 | 2024-09-21 03:35:00 | 
| 合計ジャッジ時間 | 2,129 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 27 | 
ソースコード
#include<iostream>
using namespace std;
int main(){
	int n;
	cin>>n;
	string s;
	cin>>s;
	for(int i=s.size()-1;i>=0;i--)
		if(s[i]=='A'||s[i]=='G'||s[i]=='C'||s[i]=='T')
			cout<<i+1<<endl,exit(0);
	cout<<0<<endl;
}