結果
問題 | No.1943 消えたAGCT(1) |
ユーザー | harurun |
提出日時 | 2022-05-20 22:32:07 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
AC
|
実行時間 | 106 ms / 2,000 ms |
コード長 | 1,526 bytes |
コンパイル時間 | 278 ms |
コンパイル使用メモリ | 11,952 KB |
実行使用メモリ | 10,912 KB |
最終ジャッジ日時 | 2023-10-20 13:15:54 |
合計ジャッジ時間 | 2,375 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 29 ms
10,288 KB |
testcase_01 | AC | 29 ms
10,288 KB |
testcase_02 | AC | 29 ms
10,288 KB |
testcase_03 | AC | 29 ms
10,288 KB |
testcase_04 | AC | 29 ms
10,288 KB |
testcase_05 | AC | 29 ms
10,288 KB |
testcase_06 | AC | 28 ms
10,288 KB |
testcase_07 | AC | 30 ms
10,288 KB |
testcase_08 | AC | 30 ms
10,288 KB |
testcase_09 | AC | 31 ms
10,912 KB |
testcase_10 | AC | 105 ms
10,912 KB |
testcase_11 | AC | 106 ms
10,912 KB |
testcase_12 | AC | 32 ms
10,912 KB |
testcase_13 | AC | 60 ms
10,716 KB |
testcase_14 | AC | 29 ms
10,316 KB |
testcase_15 | AC | 32 ms
10,888 KB |
testcase_16 | AC | 31 ms
10,792 KB |
testcase_17 | AC | 30 ms
10,812 KB |
testcase_18 | AC | 31 ms
10,912 KB |
testcase_19 | AC | 31 ms
10,912 KB |
testcase_20 | AC | 31 ms
10,912 KB |
testcase_21 | AC | 31 ms
10,912 KB |
testcase_22 | AC | 31 ms
10,912 KB |
testcase_23 | AC | 31 ms
10,912 KB |
testcase_24 | AC | 106 ms
10,912 KB |
testcase_25 | AC | 106 ms
10,912 KB |
testcase_26 | AC | 106 ms
10,912 KB |
ソースコード
class INPUT: def __init__(self): self._l=open(0).read().split() self._length=len(self._l) self._index=0 return def stream(self,k=1,f=int,f2=False): assert(-1<k) if self._length==self._index or self._length-self._index<k: raise Exception("There is no input!") elif f!=str: if k==0: ret=list(map(f,self._l[self._index:])) self._index=self._length return ret if k==1 and not f2: ret=f(self._l[self._index]) self._index+=1 return ret if k==1 and f2: ret=[f(self._l[self._index])] self._index+=1 return ret ret=[] for _ in [0]*k: ret.append(f(self._l[self._index])) self._index+=1 return ret else: if k==0: ret=list(self._l[self._index:]) self._index=self._length return ret if k==1 and not f2: ret=self._l[self._index] self._index+=1 return ret if k==1 and f2: ret=[self._l[self._index]] self._index+=1 return ret ret=[] for _ in [0]*k: ret.append(self._l[self._index]) self._index+=1 return ret pin=INPUT().stream #pin(number[default:1],f[default:int],f2[default:False]) #if number==0 -> return left all #listを変数で受け取るとき、必ずlistをTrueにすること。 def main(): n=pin(1) s=pin(1,str) for i in range(n-1,-1,-1): if s[i] in ["A","G","C","T"]: print(i+1) return print(0) return main()