给出一个字符串,问再加入一个字母,最多能形成多少种字符串
input
a
output
51
input
hi
output
76
1 # include <iostream> 2 # include <cstdio> 3 # include <cstring> 4 # include <algorithm> 5 # include <cmath> 6 # define LL long long 7 using namespace std ; 8 9 int main () 10 { 11 //freopen("in.txt","r",stdin) ; 12 char a[110] ; 13 while(scanf("%s" , a) != EOF) 14 { 15 int len = strlen(a); 16 printf("%d\n" , 26*(len+1)-len); 17 } 18 19 return 0 ; 20 }
时间: 2024-10-06 18:17:41