CF1829A.Love Story
入门
通过率:0%
时间限制:1.00s
内存限制:256MB
AC君温馨提醒
该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
Timur loves codeforces. That's why he has a string s having length 10 made containing only lowercase Latin letters. Timur wants to know how many indices string s differs from the string "codeforces".
For example string s= "coolforsez" differs from "codeforces" in 4 indices, shown in bold.
Help Timur by finding the number of indices where string s differs from "codeforces".
Note that you can't reorder the characters in the string s.
蒂穆尔喜欢 Codeforces。因此,他有一个长度为 10 的字符串 s,仅由小写拉丁字母组成。蒂穆尔想知道字符串 s 与字符串 "codeforces" 在多少个位置上不同。
例如,当字符串 s= "coolforsez" 时,它与 "codeforces" 在 4 个位置上不同(如下文加粗所示)。
请帮助蒂穆尔找出字符串 s 与 "codeforces" 不同的位置数量。
注意:你不能对字符串 s 中的字符进行重排。
输入格式
The first line contains a single integer t (1≤t≤1000) — the number of test cases.
Each test case is one line and contains the string s, consisting of exactly 10 lowercase Latin characters.
第一行包含一个整数 t(1≤t≤1000)—— 表示测试用例的数量。
每个测试用例占一行,包含一个字符串 s,该字符串恰好由 10 个小写拉丁字母组成。
输出格式
For each test case, output a single integer — the number of indices where string s differs.
对于每个测试用例,输出一个整数——字符串 s 中不同的索引个数。
输入输出样例
输入#1
5 coolforsez cadafurcie codeforces paiuforces forcescode
输出#1
4 5 0 4 9
输入解题思路,AI测评打分。不知道怎么写?