#46017: 好像可以用雙重for


yp11351280@yphs.tp.edu.tw (810-43韓睿哲)

學校 : 臺北市私立延平高級中學
編號 : 276272
來源 : [203.72.178.1]
最後登入時間 :
2025-10-07 16:36:49

#include<bits/stdc++.h>
using namespace std;
int main(){
    string s;
    int n=0;
    cin>>s;
    for(int i=0;i<s.size();i++){
        for(int j=i;j<s.size();j++){
            cout<<s[j];
        }
        for(int j=0;j<i;j++){
            cout<<s[j];
        }
        cout<<endl;
    }
}