abc
3 The length of $S$ is $3$, so $1\leq i<j\leq 3$ is satisfied by three pairs of integers $(i,j)$: $(1,2)$, $(1,3)$, and $(2,3)$. * Swapping the $1$\-st and $2$\-nd characters of $S$ results in $S$ being `bac`. * Swapping the $1$\-st and $3$\-rd characters of $S$ results in $S$ being `cba`. * Swapping the $2$\-nd and $3$\-rd characters of $S$ results in $S$ being `acb`. Therefore, the operation on `abc` results in one of the three strings: `bac`, `cba`, and `acb`, so print $3$.
aaaaa
1 Swapping any two characters results in $S$ remaining `aaaaa`. Thus, only one string can result from the operation.
{
"problem": {
"name": "One Time Swap",
"description": {
"content": "You are given a string $S$. Find the number of strings that can result from performing the following operation **exactly once**. * Let $N$ be the length of $S$. Choose a pair of integers $(i,j)$ su",
"description_type": "Markdown"
},
"platform": "AtCoder",
"limit": {
"time_limit": 2000,
"memory_limit": 262144
},
"difficulty": "None",
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "abc345_c"
},
"statements": [
{
"statement_type": "Markdown",
"content": "You are given a string $S$. Find the number of strings that can result from performing the following operation **exactly once**.\n\n* Let $N$ be the length of $S$. Choose a pair of integers $(i,j)$ su...",
"is_translate": false,
"language": "English"
}
]
}