- #include<stdio.h>
- int main()
- {
- int n,i,j,x,m=0;
- char a[200];
- scanf("%d",&n);
- if (n>=1 && n<=100)
- {
- for (i=0; i<n; i++)
- {
- scanf("%s",&a);
- x=strlen(a);
- for(j=1;j<x; j++)
- {
- if (a[j]<'a' || a[j]>'z')
- {
- m=1;
- if (m==1) break;
- }
- }
- if (m==1) break;
- if (x>10 && x<=100) printf("%c%d%c\n",a[0],x-2,a[x-1]);
- else printf("%s\n",a);
- }
- }
- return 0;
- }
Thursday, January 16, 2020
Codeforces 71A Way Too Long Words Solution in C
I am Sujan Mridha, given the solution of Codeforces Problem 71A Way Too Long Words in C
Subscribe to:
Post Comments (Atom)
Codeforces 131A cAPS lOCK Solution in C
#include <stdio.h> int main () { char ch [ 106 ]; int i , j , ck = 1 ; scanf ( "%s" , ch ); ...
-
#include <stdio.h> int main () { int o , n , a , b , c , s , t , u ; s = 0 ; t = 0 ; u = 0 ...
-
#include <stdio.h> #include <string.h> int main () { int i , j , k , n , s ; char x [ 7 ]; scanf ( "%d"...
-
#include <stdio.h> #include <string.h> int main () { int i , n , l = 0 ; char a [ 120 ]; scanf ( ...
No comments:
Post a Comment