mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
1b4d6396e4
2700-2799
22 lines
606 B
C++
22 lines
606 B
C++
#include <iostream>
|
|
#include <cstring>
|
|
#include <cstdio>
|
|
using namespace std;
|
|
int main(){
|
|
char str[100];
|
|
while(scanf("%s", str)&&str[0]!='#'){
|
|
int flag=1, ans=0, len=strlen(str), t=0, i;
|
|
for(i=0; i<len; i++){
|
|
switch(str[i]){
|
|
case '/':if(flag)ans+=100;flag=0;break;
|
|
case '\\':t=100;break;
|
|
case '.':ans+=t+100;t=0;flag=1;break;
|
|
case '_':break;
|
|
case '|':if(flag)ans+=50;flag=0;t=50;break;
|
|
}
|
|
}
|
|
printf("%d\n", (ans+t)/len);
|
|
}
|
|
return 0;
|
|
}
|