public class Main { public static void main(String[] args){ String str; int q; Scanner sc = new Scanner(System.in); str = sc.nextLine(); char[] ch = str.toCharArray(); q = sc.nextInt(); for (int i = 0; i < q; i++){ int l = sc.nextInt(); int r = sc.nextInt(); int k = sc.nextInt(); for (int j = l-1; j < r; j++){ int a = ch[j]-k; if (a < 97){ a += 26; } ch[j] = (char)a; } } String s = String.valueOf(ch); System.out.println(s); } }
全部评论
(7) 回帖