結果
問題 |
No.1159 Sashiming String
|
ユーザー |
|
提出日時 | 2022-07-05 21:25:51 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 49 ms / 2,000 ms |
コード長 | 247 bytes |
コンパイル時間 | 202 ms |
コンパイル使用メモリ | 82,176 KB |
実行使用メモリ | 59,648 KB |
最終ジャッジ日時 | 2024-12-16 07:43:47 |
合計ジャッジ時間 | 1,786 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 12 |
ソースコード
S = input() ans = 0 n = len(S) idx = 0 Scnt = 0 while idx < n: if S[idx] == 'S': Scnt += 1 idx += 1 elif idx <= n - 3 and S[idx:idx + 3] == 'ing': ans += Scnt idx += 3 else: idx += 1 print(ans)