結果

問題 No.1159 Sashiming String
ユーザー matriematrie
提出日時 2020-12-25 01:51:03
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 76 ms / 2,000 ms
コード長 164 bytes
コンパイル時間 539 ms
コンパイル使用メモリ 11,824 KB
実行使用メモリ 12,808 KB
最終ジャッジ日時 2023-10-21 16:09:01
合計ジャッジ時間 1,757 ms
ジャッジサーバーID
(参考情報)
judge10 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
10,120 KB
testcase_01 AC 30 ms
10,120 KB
testcase_02 AC 47 ms
11,020 KB
testcase_03 AC 58 ms
12,336 KB
testcase_04 AC 46 ms
11,112 KB
testcase_05 AC 57 ms
12,008 KB
testcase_06 AC 45 ms
11,116 KB
testcase_07 AC 51 ms
11,416 KB
testcase_08 AC 67 ms
12,280 KB
testcase_09 AC 76 ms
12,808 KB
testcase_10 AC 29 ms
10,120 KB
testcase_11 AC 29 ms
10,120 KB
testcase_12 AC 29 ms
10,120 KB
testcase_13 AC 29 ms
10,120 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import re
s=re.sub(r'S','0',input())
s=re.sub(r'ing','1',s)
s=re.sub(r'[a-zA-Z]','',s)
l=list(map(int,list(s)))
a=c=0
for i in l:
	if i<1: a+=1
	else: c+=a
print(c)
0