14312022-09-22 00:30:03tomi7Morze (60 pont)cpp11Accepted 60/603ms3440 KiB
#include <bits/stdc++.h>
using namespace std;
 
 
int main(){
    string s;
    cin>>s;
    int n=s.size();
    int j=0;
    for(int i=0;i<n/5;i++){
         if(s[j]=='-' && s[j+1]=='-' && s[j+2]=='-' && s[j+3]=='-' && s[j+4]=='-'){
             cout<<0;
         }
         if(s[j]=='.' && s[j+1]=='-' && s[j+2]=='-' && s[j+3]=='-' && s[j+4]=='-'){
             cout<<1;
         }
         if(s[j]=='.' && s[j+1]=='.' && s[j+2]=='-' && s[j+3]=='-' && s[j+4]=='-'){
             cout<<2;
         }
         if(s[j]=='.' && s[j+1]=='.' && s[j+2]=='.' && s[j+3]=='-' && s[j+4]=='-'){
             cout<<3;
         }
         if(s[j]=='.' && s[j+1]=='.' && s[j+2]=='.' && s[j+3]=='.' && s[j+4]=='-'){
             cout<<4;
         }
         if(s[j]=='.' && s[j+1]=='.' && s[j+2]=='.' && s[j+3]=='.' && s[j+4]=='.'){
             cout<<5;
         }
         if(s[j]=='-' && s[j+1]=='.' && s[j+2]=='.' && s[j+3]=='.' && s[j+4]=='.'){
             cout<<6;
         }
         if(s[j]=='-' && s[j+1]=='-' && s[j+2]=='.' && s[j+3]=='.' && s[j+4]=='.'){
             cout<<7;
         }
         if(s[j]=='-' && s[j+1]=='-' && s[j+2]=='-' && s[j+3]=='.' && s[j+4]=='.'){
             cout<<8;
         }
         if(s[j]=='-' && s[j+1]=='-' && s[j+2]=='-' && s[j+3]=='-' && s[j+4]=='.'){
             cout<<9;
         }
         j+=5;
    }
    cout<<'\n';
}
SubtaskSumTestVerdictTimeMemory
base60/60
1Accepted0/03ms1812 KiB
2Accepted0/02ms2004 KiB
3Accepted3/32ms2204 KiB
4Accepted3/32ms2412 KiB
5Accepted3/32ms2768 KiB
6Accepted3/32ms2704 KiB
7Accepted3/32ms3088 KiB
8Accepted3/32ms3016 KiB
9Accepted4/42ms3208 KiB
10Accepted4/42ms3336 KiB
11Accepted4/42ms3304 KiB
12Accepted7/72ms3312 KiB
13Accepted7/72ms3308 KiB
14Accepted8/82ms3312 KiB
15Accepted8/82ms3440 KiB