Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include<bits/stdc++.h>
- #include<utility>
- #include <queue>
- #include <vector>
- #include <iterator>
- #include <set>
- #define ll long long
- #define ull unsigned long long
- #define pi 3.14159
- #define OO 2000000000
- //#define ceil(w, m) (((w) / (m)) + ((w) % (m) ? 1 : 0))
- using namespace std;
- void yasmeen_fakhri(){
- ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr);
- #ifndef ONLINE_JUDGE
- freopen("input.txt", "r", stdin), freopen("output.txt", "w", stdout);
- #endif
- }
- int main() {
- yasmeen_fakhri();
- freopen("adam.in", "r", stdin);
- int t; cin>>t;
- while (t--){
- string s;
- cin>>s;
- int n= s.size();
- int c=0 ;
- for(int i=0 ; i<n ; i++ ){
- if(s[i] == 'D') break;
- else c++;
- }
- cout<<c;
- if (t != 0) cout<<'\n';
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement