mirror of
https://github.com/tiennm99/codeforces.git
synced 2026-10-14 10:18:15 +00:00
[Init] Solved solutions
This commit is contained in:
1 parent
51f667ac81
commit
20542601dd
131 files changed
+4148
No files matched your search
+38
@@ -0,0 +1,38 @@
|
||||
using System;
|
||||
|
||||
namespace problem_474A
|
||||
{
|
||||
class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
string s = "qwertyuiop[]\\asdfghjkl;'zxcvbnm,./";
|
||||
string c = Console.ReadLine();
|
||||
string ip = Console.ReadLine();
|
||||
string op = "";
|
||||
if (c == "R")
|
||||
{
|
||||
for (int i = 0; i < ip.Length; i++)
|
||||
{
|
||||
int p = s.IndexOf(ip[i]);
|
||||
if (p != -1)
|
||||
{
|
||||
op += s[p - 1];
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < ip.Length; i++)
|
||||
{
|
||||
int p = s.IndexOf(ip[i]);
|
||||
if (p != -1)
|
||||
{
|
||||
op += s[p + 1];
|
||||
}
|
||||
}
|
||||
}
|
||||
Console.WriteLine(op);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user