mirror of
https://github.com/wczffl-503/OI-Codes.git
synced 2025-07-08 02:13:51 +08:00
Update: Rename folder name to XSMOJ
This commit is contained in:
28
XSMOJ/小码君的D之意志.cpp
Normal file
28
XSMOJ/小码君的D之意志.cpp
Normal file
@ -0,0 +1,28 @@
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
#include <cstring>
|
||||
#include <cstdio>
|
||||
#include <ctime>
|
||||
#include <cmath>
|
||||
typedef long long l;
|
||||
typedef double d;
|
||||
typedef char c;
|
||||
using namespace std;
|
||||
int main(){
|
||||
c a[1000];
|
||||
l cnt=0;
|
||||
cin >>a;
|
||||
l tem=0;
|
||||
for(int i=0;i<strlen(a);i++){
|
||||
if(a[i]=='D'){
|
||||
tem=1;
|
||||
}
|
||||
if(a[i]==','){
|
||||
cnt+=tem;
|
||||
tem=0;
|
||||
}
|
||||
}
|
||||
cnt+=tem;
|
||||
cout <<cnt;
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user