标签:har pre string word log using stream cin code
#include <iostream> #include <iomanip> #include <cstdlib> #include <string> #include <sstream> using namespace std; string num2str(int i) { stringstream ss; ss<<i; return ss.str(); } bool isLower(char s) { return (int)s >= (int)‘a‘ && (int)s <= (int)‘z‘; } int main(){ int m,n; string s; cin>>m; while(m--) { cin>>s; cin>>n; int t = s.length() - n % s.length(); s = s.substr(t) + s.substr(0,t); cout<<s<<endl; } // cout<<setiosflags(ios::fixed)<<setprecision(4)<<s<<endl; // cout<< setiosflags(ios::fixed)<<setprecision(4) <<c<<endl; }
标签:har pre string word log using stream cin code
原文地址:http://www.cnblogs.com/shiningrise/p/6503131.html