結果
問題 | No.111 あばばばば |
ユーザー | Twizz |
提出日時 | 2017-02-23 11:57:07 |
言語 | Python3 (3.11.6 + numpy 1.26.0 + scipy 1.11.3) |
結果 |
WA
|
実行時間 | - |
コード長 | 294 bytes |
コンパイル時間 | 119 ms |
コンパイル使用メモリ | 10,576 KB |
実行使用メモリ | 13,400 KB |
最終ジャッジ日時 | 2023-08-30 21:19:55 |
合計ジャッジ時間 | 6,666 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge13 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | WA | - |
testcase_02 | TLE | - |
testcase_03 | -- | - |
testcase_04 | -- | - |
testcase_05 | -- | - |
testcase_06 | -- | - |
testcase_07 | -- | - |
testcase_08 | -- | - |
testcase_09 | -- | - |
ソースコード
a=int(input()) l="a"+"ba"*a print(l) count=0 for (i,x) in enumerate(l): for (j,y) in enumerate(l[i+1:]): for k in range(0,j-i): if l[i+k]==l[j-k]: if k==j-1: count+=1 elif l[i+k]!=l[j-k]: break print(count)