結果
| 問題 |
No.1943 消えたAGCT(1)
|
| コンテスト | |
| ユーザー |
ks2m
|
| 提出日時 | 2022-05-20 23:48:11 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 248 ms / 2,000 ms |
| コード長 | 408 bytes |
| コンパイル時間 | 1,902 ms |
| コンパイル使用メモリ | 74,852 KB |
| 実行使用メモリ | 46,764 KB |
| 最終ジャッジ日時 | 2024-09-20 10:13:58 |
| 合計ジャッジ時間 | 7,998 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 27 |
ソースコード
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
char[] s = sc.next().toCharArray();
sc.close();
for (int i = n - 1; i >= 0; i--) {
if (s[i] == 'A' || s[i] == 'G' || s[i] == 'C' || s[i] == 'T') {
System.out.println(i + 1);
return;
}
}
System.out.println(0);
}
}
ks2m