Submission #8629425


Source Code Expand

Copy
#include<bits/stdc++.h>
#define rep(i,a,b) for(int i=a;i<b;i++)
#define rrep(i,a,b) for(int i=a;i>=b;i--)
#define fore(i,a) for(auto &i:a)
#define all(x) (x).begin(),(x).end()
//#pragma GCC optimize ("-O3")
using namespace std; void _main(); int main() { cin.tie(0); ios::sync_with_stdio(false); _main(); }
typedef long long ll; const int inf = INT_MAX / 2; const ll infl = 1LL << 60;
template<class T>bool chmax(T& a, const T& b) { if (a < b) { a = b; return 1; } return 0; }
template<class T>bool chmin(T& a, const T& b) { if (b < a) { a = b; return 1; } return 0; }
//---------------------------------------------------------------------------------------------------
/*---------------------------------------------------------------------------------------------------
            ∧_∧
      ∧_∧  (´<_` )  Welcome to My Coding Space!
     ( ´_ゝ`) /  ⌒i     @hamayanhamayan
    /   \     | |
    /   / ̄ ̄ ̄ ̄/  |
  __(__ニつ/     _/ .| .|____
     \/____/ (u ⊃
---------------------------------------------------------------------------------------------------*/














int N; string S;
//---------------------------------------------------------------------------------------------------
void _main() {
	cin >> N >> S;
	fore(c, S) {
		int x = c - 'A';
		x = (x + N) % 26;
		printf("%c", char(x + 'A'));
	}
	printf("\n");
}





Submission Info

Submission Time
Task B - ROT N
User hamayanhamayan
Language C++14 (GCC 5.4.1)
Score 200
Code Size 1551 Byte
Status
Exec Time 1 ms
Memory 256 KB

Judge Result

Set Name Score / Max Score Test Cases
Sample 0 / 0 sample_01, sample_02, sample_03
All 200 / 200 random_01, random_02, random_03, random_04, random_05, random_06, random_07, random_08, random_09, random_10, random_11, random_12, random_13, random_14, random_15, random_16, random_17, sample_01, sample_02, sample_03
Case Name Status Exec Time Memory
random_01 1 ms 256 KB
random_02 1 ms 256 KB
random_03 1 ms 256 KB
random_04 1 ms 256 KB
random_05 1 ms 256 KB
random_06 1 ms 256 KB
random_07 1 ms 256 KB
random_08 1 ms 256 KB
random_09 1 ms 256 KB
random_10 1 ms 256 KB
random_11 1 ms 256 KB
random_12 1 ms 256 KB
random_13 1 ms 256 KB
random_14 1 ms 256 KB
random_15 1 ms 256 KB
random_16 1 ms 256 KB
random_17 1 ms 256 KB
sample_01 1 ms 256 KB
sample_02 1 ms 256 KB
sample_03 1 ms 256 KB