UVA 10298 - Power Strings

UVA Sep 01, 2020

Problem PDF

Solution:

#include
#include
#include
#include
#include
#include
char s[10000000];
using namespace std;
int main()
{
    int a,i,b;
   while(gets(s))
   {
       if(s[0]=='.'&&!s[1])
       break;
       a=strlen(s);
       b=1;
       for(i=1;s[i];i++)
       while(s[i]!=s[i%b])
       b++;
       if(i%b==0)
       cout<
https://github.com/Shipu/OnlineJudgeProblemSolutionWithCPlusPlus/tree/master/uva/10298/10298.cpp

Tags

Shipu Ahamed

CSPO® | Partly Product, Project Manager and Partly Software Engineer.

Great! You've successfully subscribed.
Great! Next, complete checkout for full access.
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.