Search is not available for this dataset
name
stringlengths 2
112
| description
stringlengths 29
13k
| source
int64 1
7
| difficulty
int64 0
25
| solution
stringlengths 7
983k
| language
stringclasses 4
values |
---|---|---|---|---|---|
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
import java.util.*;
/**
*
* @author Vincent
*/
public class troll {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int[] arr = {0, 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1, 52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4, 267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1, 52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2};
System.out.println(arr[sc.nextInt()]);
}
}
| JAVA |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | #include <bits/stdc++.h>
using namespace std;
int main() {
int ans[] = {0, 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1,
14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1,
51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1,
52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4,
267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1,
52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2};
int n;
cin >> n;
cout << ans[n];
return 0;
}
| CPP |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | l=[0,1,1,1,2,1,2,1,5,2,2,1,5,1,2,1,14,1,5,1,5,2,2,1,15,2,2,5,4,1,4,1,51,1,2,1,14,1,2,2,14,1,6,1,4,2,2,1,52,2,5,1,5,1,15,2,13,2,2,1,13,1,2,4,267,1,4,1,5,1,4,1,50,1,2,3,4,1,6,1,52,15,2,1,15,1,2,1,12,1,10,1,4,2]
n=int(input())
print(l[n]) | PYTHON3 |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | #include <bits/stdc++.h>
using namespace std;
const int a[500] = {0, 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1,
14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1,
51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1,
52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4,
267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1,
52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2};
int main() {
int n;
scanf("%d", &n);
printf("%d\n", a[n]);
return 0;
}
| CPP |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | #include <bits/stdc++.h>
using namespace std;
int t[] = {1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5,
2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51, 1, 2, 1, 14, 1, 2, 2, 14,
1, 6, 1, 4, 2, 2, 1, 52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13,
1, 2, 4, 267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1, 52,
15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2};
int x;
int main() {
cin >> x;
cout << t[x - 1];
}
| CPP |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, ans[] = {0, 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14,
1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51, 1,
2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1, 52, 2, 5,
1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4, 267};
scanf("%d", &n);
printf("%d\n", ans[n]);
}
| CPP |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | a=[0, 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1, 52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4, 267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1, 52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2 ]
print(a[int(input())]) | PYTHON3 |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | #include <bits/stdc++.h>
const int a[] = {0, 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1,
14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1,
51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1,
52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4,
267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1,
52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2};
int main() {
int n;
scanf("%d", &n);
printf("%d", a[n]);
return 0;
}
| CPP |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | #include <bits/stdc++.h>
using namespace std;
const int a[] = {0, 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1,
14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1,
51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1,
52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4,
267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1,
52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2};
int main() {
int n;
cin >> n;
cout << a[n] << endl;
return 0;
}
| CPP |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | #include <bits/stdc++.h>
using namespace std;
int main() {
long long a;
cin >> a;
if (a == 2 || a == 1 || a == 3 || a == 5 || a == 7 || a == 11 || a == 13 ||
a == 15 || a == 17 || a == 19 || a == 23 || a == 29 || a == 31 ||
a == 33 || a == 35 || a == 37 || a == 41 || a == 43 || a == 47 ||
a == 51 || a == 53 || a == 59 || a == 61)
cout << 1;
if (a == 4 || a == 6 || a == 9 || a == 62 || a == 10 || a == 14 || a == 21 ||
a == 22 || a == 49 || a == 25 || a == 26 || a == 34 || a == 38 ||
a == 39 || a == 45 || a == 46 || a == 55 || a == 57 || a == 58)
cout << 2;
if (a == 27 || a == 8 || a == 12 || a == 18 || a == 20 || a == 52 || a == 50)
cout << 5;
if (a == 42) cout << 6;
if (a == 64) cout << 267;
if (a == 16 || a == 36 || a == 40) cout << 14;
if (a == 24 || a == 54) cout << 15;
if (a == 28 || a == 30 || a == 44 || a == 63) cout << 4;
if (a == 32) cout << 51;
if (a == 48) cout << 52;
if (a == 56 || a == 60) cout << 13;
}
| CPP |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | import java.io.*;
import java.math.*;
import java.util.*;
public class F {
final static int MOD = 1000000007;
static int[] a = new int[] {0, 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1, 52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4, 267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1, 52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2};
public static void main(String[] args) throws Exception {
FastReader in = new FastReader(System.in);
int n = in.nextInt();
System.out.println(a[n]);
}
static class FastReader {
private boolean finished = false;
private InputStream stream;
private byte[] buf = new byte[1024];
private int curChar;
private int numChars;
private SpaceCharFilter filter;
public FastReader(InputStream stream) {
this.stream = stream;
}
public int read() {
if (numChars == -1) {
throw new InputMismatchException();
}
if (curChar >= numChars) {
curChar = 0;
try {
numChars = stream.read(buf);
} catch (IOException e) {
throw new InputMismatchException();
}
if (numChars <= 0) {
return -1;
}
}
return buf[curChar++];
}
public int peek() {
if (numChars == -1) {
return -1;
}
if (curChar >= numChars) {
curChar = 0;
try {
numChars = stream.read(buf);
} catch (IOException e) {
return -1;
}
if (numChars <= 0) {
return -1;
}
}
return buf[curChar];
}
public int nextInt() {
int c = read();
while (isSpaceChar(c))
c = read();
int sgn = 1;
if (c == '-') {
sgn = -1;
c = read();
}
int res = 0;
do {
if (c == ',') {
c = read();
}
if (c < '0' || c > '9') {
throw new InputMismatchException();
}
res *= 10;
res += c - '0';
c = read();
} while (!isSpaceChar(c));
return res * sgn;
}
public long nextLong() {
int c = read();
while (isSpaceChar(c))
c = read();
int sgn = 1;
if (c == '-') {
sgn = -1;
c = read();
}
long res = 0;
do {
if (c < '0' || c > '9') {
throw new InputMismatchException();
}
res *= 10;
res += c - '0';
c = read();
} while (!isSpaceChar(c));
return res * sgn;
}
public String nextString() {
int c = read();
while (isSpaceChar(c))
c = read();
StringBuilder res = new StringBuilder();
do {
res.appendCodePoint(c);
c = read();
} while (!isSpaceChar(c));
return res.toString();
}
public boolean isSpaceChar(int c) {
if (filter != null) {
return filter.isSpaceChar(c);
}
return isWhitespace(c);
}
public static boolean isWhitespace(int c) {
return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
}
private String readLine0() {
StringBuilder buf = new StringBuilder();
int c = read();
while (c != '\n' && c != -1) {
if (c != '\r') {
buf.appendCodePoint(c);
}
c = read();
}
return buf.toString();
}
public String nextLine() {
String s = readLine0();
while (s.trim().length() == 0)
s = readLine0();
return s;
}
public String nextLine(boolean ignoreEmptyLines) {
if (ignoreEmptyLines) {
return nextLine();
} else {
return readLine0();
}
}
public BigInteger nextBigInteger() {
try {
return new BigInteger(nextString());
} catch (NumberFormatException e) {
throw new InputMismatchException();
}
}
public char nextCharacter() {
int c = read();
while (isSpaceChar(c))
c = read();
return (char) c;
}
public double nextDouble() {
int c = read();
while (isSpaceChar(c))
c = read();
int sgn = 1;
if (c == '-') {
sgn = -1;
c = read();
}
double res = 0;
while (!isSpaceChar(c) && c != '.') {
if (c == 'e' || c == 'E') {
return res * Math.pow(10, nextInt());
}
if (c < '0' || c > '9') {
throw new InputMismatchException();
}
res *= 10;
res += c - '0';
c = read();
}
if (c == '.') {
c = read();
double m = 1;
while (!isSpaceChar(c)) {
if (c == 'e' || c == 'E') {
return res * Math.pow(10, nextInt());
}
if (c < '0' || c > '9') {
throw new InputMismatchException();
}
m /= 10;
res += (c - '0') * m;
c = read();
}
}
return res * sgn;
}
public boolean isExhausted() {
int value;
while (isSpaceChar(value = peek()) && value != -1)
read();
return value == -1;
}
public String next() {
return nextString();
}
public SpaceCharFilter getFilter() {
return filter;
}
public void setFilter(SpaceCharFilter filter) {
this.filter = filter;
}
public interface SpaceCharFilter {
public boolean isSpaceChar(int ch);
}
}
}
| JAVA |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | """
Codeforces April Fools Contest 2014 Problem F
Author : chaotic_iak
Language: Python 3.3.4
"""
class InputHandlerObject(object):
inputs = []
def getInput(self, n = 0):
res = ""
inputs = self.inputs
if not inputs: inputs.extend(input().split(" "))
if n == 0:
res = inputs[:]
inputs[:] = []
while n > len(inputs):
inputs.extend(input().split(" "))
if n > 0:
res = inputs[:n]
inputs[:n] = []
return res
InputHandler = InputHandlerObject()
g = InputHandler.getInput
############################## SOLUTION ##############################
x = int(input())
a = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1, 52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4, 267]
print(a[x-1]) | PYTHON3 |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | #include <bits/stdc++.h>
int main() {
const int N = 64;
const int sequence[] = {
1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1,
5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51, 1, 2, 1, 14, 1, 2,
2, 14, 1, 6, 1, 4, 2, 2, 1, 52, 2, 5, 1, 5, 1, 15, 2, 13, 2,
2, 1, 13, 1, 2, 4, 267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4,
1, 6, 1, 52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2};
int input(0);
scanf("%d\n", &input);
printf("%d\n", sequence[input - 1]);
return 0;
}
| CPP |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | arr = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1, 52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4, 267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1, 52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2]
a = int(input())
print(arr[a-1]) | PYTHON3 |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | #include <bits/stdc++.h>
using namespace std;
const int d[] = {1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14,
1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51,
1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1, 52,
2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4, 267,
1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1, 52,
15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2};
int main() {
int a;
cin >> a;
cout << d[a - 1];
}
| CPP |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | #include <bits/stdc++.h>
using namespace std;
const int a[] = {0, 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1,
14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1,
51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1,
52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4,
267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1,
52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2};
int main() {
int x;
cin >> x;
cout << a[x];
return 0;
}
| CPP |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | #include <bits/stdc++.h>
using namespace std;
int n;
int a[1005] = {0, 1, 1, 1, 2, 1, 1, 1, 3, 2, 1, 1, 2, 1, 1, 1, 5, 1,
2, 1, 2, 1, 1, 1, 3, 2, 1, 3, 2, 1, 1, 1, 7, 1, 1, 1,
4, 1, 1, 1, 3, 1, 1, 1, 2, 2, 1, 1, 5, 2, 2, 1, 2, 1,
3, 1, 3, 1, 1, 1, 2, 1, 1, 2, 11, 1, 1, 1, 2, 1, 1, 1,
6, 1, 1, 2, 2, 1, 1, 1, 5, 5, 1, 1, 2, 1, 1, 1, 3, 1,
2, 1, 2, 1, 1, 1, 7, 1, 2, 2, 4, 1, 1, 1, 3, 1, 1, 1};
int b[1005] = {0, 0, 0, 0, 0, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0,
9, 0, 3, 0, 3, 1, 1, 0, 12, 0, 1, 2, 2, 0, 3, 0,
44, 0, 1, 0, 10, 0, 1, 1, 11, 0, 5, 0, 2, 0, 1, 0,
47, 0, 3, 0, 3, 0, 12, 1, 10, 1, 1, 0, 11, 0, 1, 2,
256, 0, 3, 0, 3, 0, 3, 0, 44, 0, 1, 1, 2, 0, 5, 0,
47, 10, 1, 0, 13, 0, 1, 0, 9, 0, 8, 0, 2};
int main() {
cin >> n;
cout << a[n] + b[n];
}
| CPP |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | #include <bits/stdc++.h>
using namespace std;
int n[80] = {0, 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14,
1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51, 1,
2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1, 52, 2, 5,
1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4, 267};
int main() {
int i;
scanf("%d", &i);
printf("%d\n", n[i]);
return 0;
}
| CPP |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | #include <bits/stdc++.h>
using namespace std;
const int List[] = {0, 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1,
14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1,
51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1,
52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4,
267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1,
52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2};
int main() {
int n;
cin >> n;
cout << List[n];
}
| CPP |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 |
import java.util.Scanner;
import java.util.Stack;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int[] save={1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1, 52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4, 267};
int n = sc.nextInt();
System.out.println(save[n-1]);
}
}
| JAVA |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | print[0, 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1, 52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4, 267][input()]
| PYTHON |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | import java.io.IOException;
public class F {
private static final int IN_BUFFER_SIZE = 1 << 16;
private static final int OUT_BUFFER_SIZE = 1 << 16;
private byte[] input = new byte[IN_BUFFER_SIZE];
private int ix = IN_BUFFER_SIZE;
private int bytesRead = ix;
private byte[] output = new byte[OUT_BUFFER_SIZE];
private int ox = 0;
private void readMore() {
try {
bytesRead = System.in.read(input, 0, IN_BUFFER_SIZE);
if (bytesRead <= 0)
throw new RuntimeException();
ix = 0;
} catch (IOException e) {
throw new RuntimeException();
}
}
private void flushOut() {
System.out.write(output, 0, ox);
ox = 0;
}
private void append(String s) {
char[] ca = s.toCharArray();
for (int i = 0; i < ca.length; i++) {
append(ca[i]);
}
}
private void append(char c) {
if (ox == OUT_BUFFER_SIZE)
flushOut();
output[ox++] = (byte) c;
}
private int nextInt() {
skipSpaces();
int ret = 0;
if (ix == bytesRead) {
readMore();
}
int sign = 1;
if (input[ix] == '-') {
sign = -1;
ix++;
}
while (true) {
if (ix == bytesRead) {
try {
readMore();
} catch (RuntimeException e) {
return ret;
}
}
if (input[ix] < '0') {
break;
}
ret *= 10;
ret += input[ix++] - '0';
}
return sign * ret;
}
private long nextLong() {
skipSpaces();
long ret = 0;
if (ix == bytesRead) {
readMore();
}
int sign = 1;
if (input[ix] == '-') {
sign = -1;
ix++;
}
while (true) {
if (ix == bytesRead) {
try {
readMore();
} catch (RuntimeException e) {
return ret;
}
}
if (input[ix] < '0')
break;
ret *= 10;
ret += input[ix++] - '0';
}
return sign * ret;
}
private String nextLine() {
StringBuilder sb = new StringBuilder();
while (true) {
if (ix == bytesRead) {
readMore();
}
char c = (char) input[ix++];
if (c == '\n')
break;
sb.append(c);
}
return sb.toString();
}
private String nextString() {
try {
skipSpaces();
} catch (RuntimeException e) {
return null;
}
StringBuilder sb = new StringBuilder();
while (true) {
if (ix == bytesRead) {
try {
readMore();
} catch (RuntimeException e) {
return sb.toString();
}
}
if (input[ix] <= ' ')
break;
sb.append((char) input[ix++]);
}
return sb.toString();
}
private String nextStringIncludeSpace32() {
try {
skipSpaces();
} catch (RuntimeException e) {
return null;
}
StringBuilder sb = new StringBuilder();
while (true) {
if (ix == bytesRead) {
try {
readMore();
} catch (RuntimeException e) {
return sb.toString();
}
}
if (input[ix] < ' ')
break;
sb.append((char) input[ix++]);
}
return sb.toString();
}
private void nextCharArray(char[] ca, int len) {
skipSpaces();
for (int i = 0; i < len; i++) {
if (ix == bytesRead) {
readMore();
}
ca[i] = (char) input[ix++];
}
}
private int charArrayLength;
private void nextCharArray(char[] ca) {
skipSpaces();
if (ix == bytesRead) {
readMore();
}
charArrayLength = 0;
ca[charArrayLength++] = (char) input[ix++];
while (true) {
if (ix == bytesRead) {
try {
readMore();
} catch (RuntimeException e) {
return;
}
}
char c = (char) input[ix++];
if (c < '0')
break;
ca[charArrayLength++] = c;
}
}
private char nextCharSkipRest() {
skipSpaces();
if (ix == bytesRead) {
readMore();
}
char ret = (char) input[ix++];
while (true) {
if (ix == bytesRead) {
readMore();
}
if (input[ix++] <= ' ')
break;
}
return ret;
}
int cntSize;
private char lastCharSkipRest() {
skipSpaces();
if (ix == bytesRead) {
readMore();
}
char ret = (char) input[ix++];
cntSize = 1;
while (true) {
if (ix == bytesRead) {
readMore();
}
char c = (char) input[ix++];
if (c <= ' ')
break;
ret = c;
cntSize++;
}
return ret;
}
private void skipSpaces() {
while (true) {
if (ix == bytesRead) {
readMore();
}
if (input[ix] > ' ')
break;
ix++;
}
}
private char[] nn = new char[32];
private void printLong(long n) {
if (n == 0) {
append('0');
} else {
if (n < 0) {
append('-');
n = -n;
}
int kk = 0;
while (n > 0) {
nn[kk++] = (char) (n % 10 + '0');
n /= 10;
}
for (int i = kk - 1; i >= 0; i--) {
append(nn[i]);
}
}
}
private void printInt(int n) {
if (n == 0) {
append('0');
} else {
if (n < 0) {
append('-');
n = -n;
}
int kk = 0;
while (n > 0) {
nn[kk++] = (char) (n % 10 + '0');
n /= 10;
}
for (int i = kk - 1; i >= 0; i--) {
append(nn[i]);
}
}
}
private void printDouble(double x, int p) {
if (p == 0) {
printLong(Math.round(x));
} else {
long pow = 1;
for (int i = 0; i < p; i++) {
pow *= 10;
}
x *= pow;
long t = Math.round(x);
printLong(t / pow);
append('.');
long rem = t % pow;
if (rem == 0) {
while (p-- > 0)
append('0');
} else {
long tt = rem;
while (tt > 0) {
p--;
tt /= 10;
}
while (p-- > 0)
append('0');
printLong(rem);
}
}
}
private int parseInt(String s) {
int result = 0;
int sign = (s.charAt(0) == '-') ? -1 : 1;
if (sign == -1) {
s = s.substring(1);
}
if (s.charAt(0) == '+') {
s = s.substring(1);
}
int i = 0, max = s.length();
if (max > 0) {
while (i < max) {
result *= 10;
result += s.charAt(i++) - 48;
}
}
return sign * result;
}
private long gcd(long a, long b) {
return b == 0 ? a : gcd(b, a % b);
}
private int powMod(int n, int k, int m) {
if (k == 0)
return 1;
if ((k & 1) == 0) {
int t = powMod(n, k / 2, m);
return (t * t) % m;
}
return (n * powMod(n, k - 1, m)) % m;
}
private long[][] ID = { { 1, 0 }, { 0, 1 } };
private long[][] pow(long[][] a, long k, long m) {
if (k == 0)
return ID;
if ((k & 1) == 0) {
long[][] t = pow(a, k / 2, m);
return mul(t, t, m);
}
return mul(a, pow(a, k - 1, m), m);
}
private long[][] mul(long[][] a, long[][] b, long m) {
return new long[][] {
{ (a[0][0] * b[0][0] + a[0][1] * b[1][0]) % m,
(a[0][0] * b[0][1] + a[0][1] * b[1][1]) % m },
{ (a[1][0] * b[0][0] + a[1][1] * b[1][0]) % m,
(a[1][0] * b[0][1] + a[1][1] * b[1][1]) % m } };
}
private final static int NN = 52; // max number of nodes
private int[][] cap = new int[NN][NN]; // both
private int[][] fnet = new int[NN][NN]; // ff
private int[] q = new int[NN];
private int[] prev = new int[NN];
private int qf, qb;
private int fordFulkerson(int n, int s, int t) {
for (int i = 0; i < n; i++) {
for (int j = i; j < n; j++) {
fnet[i][j] = fnet[j][i] = 0;
}
}
int flow = 0;
while (true) {
// find an augmenting path
for (int i = 0; i < n; i++) {
prev[i] = -1;
}
qf = qb = 0;
prev[s] = -2;
q[qb++] = s;
while (qb > qf && prev[t] == -1) {
int u = q[qf++];
int v = 0;
while (v < n) {
if (prev[v] == -1 && fnet[u][v] - fnet[v][u] < cap[u][v]) {
prev[v] = u;
q[qb++] = v;
}
v++;
}
}
// see if we are done
if (prev[t] == -1) {
break;
}
// get the bottleneck capacity
int bot = Integer.MAX_VALUE;
int v = t;
int u = prev[v];
while (u >= 0) {
int tt = cap[u][v] - fnet[u][v] + fnet[v][u];
if (tt < bot)
bot = tt;
v = u;
u = prev[v];
}
// update the flow network
v = t;
u = prev[v];
while (u >= 0) {
fnet[u][v] += bot;
v = u;
u = prev[v];
}
flow += bot;
}
return flow;
}
private void addEdge(int u, int v, int cp) {
cap[u][v] += cp;
}
private void addEdgeUndirected(int u, int v, int cp) {
addEdge(u, v, cp);
addEdge(v, u, cp);
}
private int[] tmpSrt; // initialize me!
private void sort(int array[], int begin, int end) {
int mid;
if (end - begin <= 1) {
return;
}
mid = (begin + end) / 2;
sort(array, begin, mid);
sort(array, mid, end);
merge(array, begin, mid, end);
}
private void merge(int[] array, int start, int mid, int end) {
int i = start;
int j = mid;
int k = 0;
while ((i < mid) && (j < end)) {
if (array[i] <= array[j]) {
tmpSrt[k++] = array[i++];
} else {
tmpSrt[k++] = array[j++];
}
}
while (i < mid) {
tmpSrt[k++] = array[i++];
}
while (j < end) {
tmpSrt[k++] = array[j++];
}
for (i = start; i < end; i++) {
array[i] = tmpSrt[i - start];
}
}
public static void main(String[] args) throws IOException {
new F().work();
}
private void work() {
int[] a = { 0, 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5,
1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51, 1, 2, 1, 14, 1, 2,
2, 14, 1, 6, 1, 4, 2, 2, 1, 52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2,
1, 13, 1, 2, 4, 267 };
printInt(a[nextInt()]);
append('\n');
if (ox > 0)
flushOut();
System.out.close();
}
}
| JAVA |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | A = [ 0, 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1, 52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4, 267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1, 52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2]
print(A[int(input())])
| PYTHON3 |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.util.Scanner;
public class A {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
PrintWriter out = new PrintWriter(System.out);
int N = sc.nextInt();
int[] array = new int[]{ 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1, 52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4, 267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1, 52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2 };
System.out.println(array[N-1]);
out.close();
}
static class Vector implements Comparable<Vector> {
double x, y;
public Vector(double _x, double _y) {
x = _x;
y = _y;
}
public Vector sub(Vector p) {
return new Vector(x - p.x, y - p.y);
}
public Vector add(Vector p) {
return new Vector(x + p.x, y + p.y);
}
public Vector scale(double s) {
return new Vector(x * s, y * s);
}
public Vector rot(double t) { // Rotate t radians counter-clockwise
double c = Math.cos(t);
double s = Math.sin(t);
return new Vector(x * c - y * s, x * s + y * c);
}
public Vector orthoCCW() { // Rotate 90 degrees counter-clockwise
return new Vector(-y, x);
}
public Vector norm() { // Return a vector with same angle and magnitude
// 1
return new Vector(x / mag(), y / mag());
}
public Vector project(Vector p) { // Return projection of this onto p
return p.scale(dot(p) / p.dot(p));
}
public double dot(Vector p) {
return x * p.x + y * p.y;
}
public double cross(Vector p) {
return x * p.y - y * p.x;
}
public double mag() {
return Math.sqrt(x * x + y * y);
}
public double mag2() {
return x * x + y * y;
}
public double dis(Vector p) {
return sub(p).mag();
}
public double ang() {
return (Math.atan2(y, x) + 2 * Math.PI) % (2 * Math.PI);
}
public double angBetween(Vector p) { // Returns inner angle between two
// vectors
double d = Math.abs(ang() - p.ang());
return Math.min(d, 2 * Math.PI - d);
}
public int compareTo(Vector p) {
if (p.x == x)
return (int) Math.signum(y - p.y);
return (int) Math.signum(x - p.x);
}
public String toString() {
return String.format("(%.3f, %.3f)", x, y);
}
}
static class FasterScanner{
private InputStream stream;
private byte[] buf = new byte[1024];
private int curChar;
private int numChars;
public FasterScanner(){
stream = System.in;
//stream = new FileInputStream(new File("dec.in"));
}
int read(){
if(numChars==-1)
throw new InputMismatchException();
if(curChar>=numChars){
curChar = 0;
try{
numChars = stream.read(buf);
} catch (IOException e){
throw new InputMismatchException();
}
if(numChars <= 0)
return -1;
}
return buf[curChar++];
}
boolean isSpaceChar(int c){
return c==' '||c=='\n'||c=='\r'||c=='\t'||c==-1;
}
boolean isEndline(int c){
return c=='\n'||c=='\r'||c==-1;
}
int nextInt(){
return Integer.parseInt(next());
}
long nextLong(){
return Long.parseLong(next());
}
double nextDouble(){
return Double.parseDouble(next());
}
String next(){
int c = read();
while(isSpaceChar(c))
c=read();
StringBuilder res = new StringBuilder();
do{
res.appendCodePoint(c);
c=read();
} while(!isSpaceChar(c));
return res.toString();
}
String nextLine(){
int c = read();
while(isEndline(c))
c=read();
StringBuilder res = new StringBuilder();
do{
res.appendCodePoint(c);
c = read();
}while(!isEndline(c));
return res.toString();
}
}
}
| JAVA |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | #include <bits/stdc++.h>
using namespace std;
int a[105];
void update() {
a[1] = 1;
a[2] = 1;
a[3] = 1;
a[4] = 2;
a[5] = 1;
a[6] = 2;
a[7] = 1;
a[8] = 5;
a[9] = 2;
a[10] = 2;
a[11] = 1;
a[12] = 5;
a[13] = 1;
a[14] = 2;
a[15] = 1;
a[16] = 14;
a[17] = 1;
a[18] = 5;
a[19] = 1;
a[20] = 5;
a[21] = 2;
a[22] = 2;
a[23] = 1;
a[24] = 15;
a[25] = 2;
a[26] = 2;
a[27] = 5;
a[28] = 4;
a[29] = 1;
a[30] = 4;
a[31] = 1;
a[32] = 51;
a[33] = 1;
a[34] = 2;
a[35] = 1;
a[36] = 14;
a[37] = 1;
a[38] = 2;
a[39] = 2;
a[40] = 14;
a[41] = 1;
a[42] = 6;
a[43] = 1;
a[44] = 4;
a[45] = 2;
a[46] = 2;
a[47] = 1;
a[48] = 52;
a[49] = 2;
a[50] = 5;
a[51] = 1;
a[52] = 5;
a[53] = 1;
a[54] = 15;
a[55] = 2;
a[56] = 13;
a[57] = 2;
a[58] = 2;
a[59] = 1;
a[60] = 13;
a[61] = 1;
a[62] = 2;
a[63] = 4;
a[64] = 267;
}
int main() {
int i;
scanf("%d", &i);
update();
printf("%d", a[i]);
return 0;
}
| CPP |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | #include <bits/stdc++.h>
int a[10001] = {1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14,
1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51,
1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1, 52,
2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4, 267};
int main() {
int n;
scanf("%d", &n);
printf("%d", a[n - 1]);
return 0;
}
| CPP |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | #include <bits/stdc++.h>
using namespace std;
int fuck[1000] = {0, 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1,
14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1,
51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1,
52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4,
267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1,
52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2};
int main() {
int a;
cin >> a;
cout << fuck[a];
}
| CPP |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
/**
* @param args
*/
public static void main(String[] args) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(
System.in));
int x = Integer.valueOf(reader.readLine());
int[] is = { 0, 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5,
1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51, 1, 2, 1, 14, 1, 2,
2, 14, 1, 6, 1, 4, 2, 2, 1, 52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2,
1, 13, 1, 2, 4, 267 };
System.out.println(is[x]);
}
}
| JAVA |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | a = int(input())
Vogas = [0,1,1,1,2,1,2,1,5,2,2,1,5,1,2,1,14,1,5,1,5,2,2,1,15,2,2,5,4,1,4,1,51,1,2,1,14,1,2,2,14,1,6,1,4,2,2,1,52,2,5,1,5,1,15,2,13,2,2,1,13,1,2,4,267,1,4,1,5,1,4,1,50,1,2,3,4,1,6,1,52,15,2,1,15,1,2,1,12,1,10,1,4,2]
print(Vogas[a]) | PYTHON3 |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | print [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1, 52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4, 267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1, 52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2][input() - 1] | PYTHON |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | a=int(input())
l=[0, 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1, 52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4, 267]
print(l[a]) | PYTHON3 |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | #include <bits/stdc++.h>
int a[] = {0, 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1,
5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51, 1, 2, 1, 14, 1, 2, 2,
14, 1, 6, 1, 4, 2, 2, 1, 52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1,
13, 1, 2, 4, 267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1,
52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2};
int main() {
int n;
scanf("%d", &n);
printf("%d", a[n]);
return 0;
}
| CPP |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | number=[0, 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1, 52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4, 267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1, 52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2]
print(number[int(input())]) | PYTHON3 |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | #include <bits/stdc++.h>
using namespace std;
const int d[] = {1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14,
1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51,
1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1, 52,
2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4, 267};
int n;
int main() {
scanf("%d", &n);
printf("%d\n", d[n - 1]);
}
| CPP |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | import java.util.*;
public class IntToInt {
public static void main(String[] args) {
IntToInt iti = new IntToInt();
iti.go();
}
public void go(){
Scanner sc = new Scanner(System.in);
int theInt = sc.nextInt();
int[] res = { 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1, 52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4, 267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1, 52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2};
// if(theInt == 1){
// System.out.println(1);
// return;
// }
//
// System.out.println(log2(theInt));
System.out.println(res[theInt-1]);
}
// int log2(int value) {
// return Integer.SIZE-Integer.numberOfLeadingZeros(value-1);
// }
} | JAVA |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | #include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
vector<int> a = {0, 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1,
14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1,
51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1,
52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4,
267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1,
52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2};
int n;
cin >> n;
cout << a[n] << "\n";
return 0;
}
| CPP |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | #include <bits/stdc++.h>
using namespace std;
int a[188] = {0, 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1,
14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1,
51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1,
52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4,
267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1,
52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2};
int main() {
int n;
scanf("%d", &n);
printf("%d\n", a[n]);
}
| CPP |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | import sys,math
def read_ints():
s = sys.stdin.readline()
s = s.split()
#pairs = [map(int, raw_input().split()) for _ in raw_input().split()]
arr = [int(q) for q in s]
return arr
oeis = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1, 52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4, 267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1, 52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2]
inpval = read_ints()[0]
print oeis[inpval-1]
| PYTHON |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | #include <bits/stdc++.h>
using namespace std;
int a[] = {0, 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1,
5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51, 1, 2, 1, 14, 1, 2, 2,
14, 1, 6, 1, 4, 2, 2, 1, 52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1,
13, 1, 2, 4, 267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1,
52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2};
int main() {
int b;
cin >> b;
cout << a[b];
}
| CPP |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | lst = [0, 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1, 52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4, 267]
x = int(raw_input(''))
print lst[x] | PYTHON |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | def readint():
return map(int, raw_input().split())
def readstring():
return raw_input().split()
pass
pass
ans = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51,
1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1, 52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4, 267]
a = readint()
print ans[a[0] - 1]
| PYTHON |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | #include <bits/stdc++.h>
using namespace std;
const int a[] = {0, 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1,
14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1,
51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1,
52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4,
267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1,
52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2};
int n;
int main() {
scanf("%d", &n);
printf("%d\n", a[n]);
return 0;
}
| CPP |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | import java.io.*;
import java.util.*;
public class Main implements Runnable {
public void _main() throws IOException {
// OEIS A000001
int[] a = {1,1,1,2,1,2,1,5,2,2,1,5,1,2,1,14,1,5,1,5,2,2,1,
15,2,2,5,4,1,4,1,51,1,2,1,14,1,2,2,14,1,6,1,4,2,2,
1,52,2,5,1,5,1,15,2,13,2,2,1,13,1,2,4,267,1,4,1,5,
1,4,1,50,1,2,3,4,1,6,1,52,15,2,1,15,1,2,1,12,1,10,
1,4,2};
int n = nextInt() - 1;
out.println(a[n]);
}
private BufferedReader in;
private PrintWriter out;
private StringTokenizer st;
private String next() throws IOException {
while (st == null || !st.hasMoreTokens()) {
String rl = in.readLine();
if (rl == null)
return null;
st = new StringTokenizer(rl);
}
return st.nextToken();
}
private int nextInt() throws IOException {
return Integer.parseInt(next());
}
private long nextLong() throws IOException {
return Long.parseLong(next());
}
private double nextDouble() throws IOException {
return Double.parseDouble(next());
}
public static void main(String[] args) {
Locale.setDefault(Locale.UK);
new Thread(new Main()).start();
}
public void run() {
try {
in = new BufferedReader(new InputStreamReader(System.in));
out = new PrintWriter(System.out);
//in = new BufferedReader(new FileReader("a.in"));
//out = new PrintWriter(new FileWriter("a.out"));
_main();
out.close();
} catch (Exception e) {
e.printStackTrace();
System.exit(202);
}
}
}
| JAVA |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | #include <bits/stdc++.h>
using namespace std;
int a[100] = {0, 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1,
14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1,
51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1,
52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4,
267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1,
52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2};
int main() {
int n;
cin >> n;
cout << a[n] << '\n';
return 0;
}
| CPP |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | x = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1, 52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4, 267]
print x[int(raw_input())-1] | PYTHON |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | #include <bits/stdc++.h>
int a[] = {0, 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1,
5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51, 1, 2, 1, 14, 1, 2, 2,
14, 1, 6, 1, 4, 2, 2, 1, 52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1,
13, 1, 2, 4, 267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1,
52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2};
int main() {
int x;
scanf("%d", &x);
printf("%d\n", a[x]);
return 0;
}
| CPP |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | #include <bits/stdc++.h>
using namespace std;
int main() {
int a[100] = {0, 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1,
14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1,
51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1,
52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4,
267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1,
52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2};
long long b;
cin >> b;
cout << a[b] << endl;
}
| CPP |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | #include <bits/stdc++.h>
using namespace std;
int a[100] = {0, 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1,
14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1,
51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1,
52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4,
267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1,
52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2};
int main() {
int n;
cin >> n;
cout << a[n];
return 0;
}
| CPP |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | #include <bits/stdc++.h>
using namespace std;
const int a[] = {0, 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1,
14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1,
51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1,
52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4,
267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1,
52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2};
int main() {
int n;
scanf("%d", &n);
printf("%d", a[n]);
}
| CPP |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | #include <bits/stdc++.h>
using namespace std;
const int a[64] = {1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14,
1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51,
1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1, 52,
2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4, 267};
int main() {
int n;
cin >> n;
cout << a[n - 1];
return 0;
}
| CPP |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | #include <bits/stdc++.h>
using namespace std;
int main() {
int k[101] = {0, 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1,
14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1,
51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1,
52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4,
267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1,
52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2};
int n;
cin >> n;
cout << k[n];
}
| CPP |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | print [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1, 52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4, 267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1, 52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2][int(raw_input()) - 1]
| PYTHON |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | #include <bits/stdc++.h>
using namespace std;
const int a[] = {0, 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1,
14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1,
51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1,
52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4,
267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1,
52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2};
int findit(int x) { return a[x]; }
int main() {
int n;
cin >> n;
cout << findit(n) << endl;
return 0;
}
| CPP |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | #include <bits/stdc++.h>
int main() {
int x, ara[] = {1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14,
1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51,
1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1, 52,
2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4, 267,
1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1, 52,
15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2};
scanf("%d", &x);
printf("%d", ara[x - 1]);
return 0;
}
| CPP |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | arr = [0,1,1,1,2,1,2,1,5,2,2,1,5,1,2,1,14,1,5,1,5,2,2,1,15,2,2,5,4,1,4,1,51,1,2,1,14,1,2,2,14,1,6,1,4,2,2,1,52,2,5,1,5,1,15,2,13,2,2,1,13,1,2,4,267,1,4,1,5,1,4,1,50,1,2,3,4,1,6,1,52,15,2,1,15,1,2,1,12,1,10,1,4,2]
n = int(input())
print(arr[n]) | PYTHON3 |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | #include <bits/stdc++.h>
const int a[] = {0, 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1,
14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1,
51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1,
52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4,
267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1,
52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2};
int main() {
int n;
scanf("%d", &n);
printf("%d", a[n]);
return 0;
}
| CPP |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | #include <bits/stdc++.h>
using namespace std;
int a[100010] = {0, 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1,
14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1,
51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1,
52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4,
267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1,
52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2};
int main() {
int xtqak;
cin >> xtqak;
cout << a[xtqak] << endl;
return 0;
}
| CPP |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | #include <bits/stdc++.h>
int n, a[105] = {0, 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1,
14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1,
51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1,
52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4,
267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1,
52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2};
int main() {
scanf("%d", &n);
printf("%d", a[n]);
return 0;
}
| CPP |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | import java.io.*;
import java.util.*;
public class f409 {
public static void main(String[] args) throws FileNotFoundException {
Scanner in = new Scanner(System.in);
PrintWriter out = new PrintWriter(System.out);
int a[] = {1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1, 52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4, 267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1, 52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2};
int n = in.nextInt();
out.println(a[n - 1]);
out.close();
}
}
| JAVA |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | print([1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1, 52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4, 267][int(input())-1]) | PYTHON3 |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | #include <bits/stdc++.h>
using namespace std;
int a[64] = {1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14,
1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51,
1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1, 52,
2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4, 267};
int main() {
int b;
cin >> b;
cout << a[b - 1];
return 0;
}
| CPP |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
public class Task409F {
public static void main(String... args) throws NumberFormatException,
IOException {
Solution.main(System.in, System.out);
}
static class Scanner {
private final BufferedReader br;
private String[] cache;
private int cacheIndex;
Scanner(InputStream is) {
br = new BufferedReader(new InputStreamReader(is));
cache = new String[0];
cacheIndex = 0;
}
int nextInt() throws IOException {
if (cacheIndex >= cache.length) {
cache = br.readLine().split(" ");
cacheIndex = 0;
}
return Integer.parseInt(cache[cacheIndex++]);
}
int nextInt(int radix) throws IOException {
if (cacheIndex >= cache.length) {
cache = br.readLine().split(" ");
cacheIndex = 0;
}
return Integer.parseInt(cache[cacheIndex++], radix);
}
long nextLong() throws IOException {
if (cacheIndex >= cache.length) {
cache = br.readLine().split(" ");
cacheIndex = 0;
}
return Long.parseLong(cache[cacheIndex++]);
}
double nextDouble() throws IOException {
if (cacheIndex >= cache.length) {
cache = br.readLine().split(" ");
cacheIndex = 0;
}
return Double.parseDouble(cache[cacheIndex++]);
}
String next() throws IOException {
if (cacheIndex >= cache.length) {
cache = br.readLine().split(" ");
cacheIndex = 0;
}
return cache[cacheIndex++];
}
void close() throws IOException {
br.close();
}
}
static class Solution {
public static void main(InputStream is, OutputStream os)
throws NumberFormatException, IOException {
PrintWriter pw = new PrintWriter(os);
Scanner sc = new Scanner(is);
long[] retVal = {
1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2,
2, 1, 52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4, 267};
pw.println(retVal[sc.nextInt() - 1]);
pw.flush();
sc.close();
}
}
} | JAVA |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | #include <bits/stdc++.h>
using namespace std;
long long ky[65] = {0, 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14,
1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51, 1,
2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1, 52, 2, 5,
1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4, 267};
int main() {
long long k;
scanf("%lld", &k);
printf("%lld\n", ky[k]);
}
| CPP |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | #include <bits/stdc++.h>
using namespace std;
int OIE[10000] = {0, 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1,
14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1,
51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1,
52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4,
267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1,
52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2};
int main() {
int n;
cin >> n;
cout << OIE[n];
return 0;
}
| CPP |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | #include <bits/stdc++.h>
const int a[] = {0, 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1,
14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1,
51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1,
52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4,
267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1,
52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2};
int main() {
long long int n;
scanf("%d", &n);
printf("%d", a[n]);
return 0;
}
| CPP |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | #include <bits/stdc++.h>
using namespace std;
int a[226982];
int v[1000], prime[1000], m;
int gcd(int x, int y) { return x % y == 0 ? y : gcd(y, x % y); }
void dabiao() {
a[1] = 1;
a[30] = 4;
a[56] = a[60] = 13;
a[36] = a[40] = 14;
a[24] = a[54] = 15;
a[48] = 52;
a[64] = 267;
}
void work2(int p, int q) {
if (p == 2 && q % 2 == 1) a[p * q * q] = 5;
if (q % p == 1 && p % 2 == 1) a[p * q * q] = (p + 9) / 2;
if (p == 3 && q == 2) a[p * q * q] = 5;
if (p % 2 == 1 && q % 2 == 1 && q % p == p - 1) a[p * q * q] = 3;
if (p % q == 1 && p > 3 && p % (q * q) != 1) a[p * q * q] = 4;
if (p % (q * q) == 1) a[p * q * q] = 5;
if ((q % p != 1 && q % p != p - 1) && p % q != 1) a[p * q * q] = 2;
}
void work3(int p, int q, int r) {
int opt = (q % p == 1) * 4 + (r % p == 1) * 2 + (r % q == 1) * 1;
switch (opt) {
case 0:
a[p * q * r] = 1;
break;
case 1:
a[p * q * r] = 2;
break;
case 2:
a[p * q * r] = 2;
break;
case 3:
a[p * q * r] = 4;
break;
case 4:
a[p * q * r] = 2;
break;
case 5:
a[p * q * r] = 3;
break;
case 6:
a[p * q * r] = p + 2;
break;
case 7:
a[p * q * r] = p + 4;
break;
}
}
void prework(int n) {
memset(v, 0, sizeof(v));
m = 0;
for (int i = 2; i <= n; i++) {
if (v[i] == 0) {
v[i] = i;
prime[++m] = i;
a[i] = 1;
a[i * i] = 2;
a[i * i * i] = 5;
a[16] = 14;
a[32] = 51;
for (int j = 1; j < m; j++) {
if (gcd(i, prime[j] - 1) == 1) a[i * prime[j]] = 1;
if (gcd(i, prime[j] - 1) == i) a[i * prime[j]] = 2;
if (gcd(prime[j], i - 1) == 1) a[i * prime[j]] = 1;
if (gcd(prime[j], i - 1) == prime[j]) a[i * prime[j]] = 2;
work2(i, prime[j]);
work2(prime[j], i);
for (int k = 1; k < j; k++) {
work3(prime[k], prime[j], i);
}
}
}
for (int j = 1; j <= m; j++) {
if (prime[j] > v[i] || prime[j] > n / i) break;
v[i * prime[j]] = prime[j];
}
}
}
int main() {
int n;
cin >> n;
prework(62);
dabiao();
cout << a[n] << endl;
return 0;
}
| CPP |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | import java.util.Scanner;
public class Task {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int a = in.nextInt();
int[] arr = {1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5,
4, 1, 4, 1, 51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1, 52, 2, 5, 1, 5, 1, 15, 2,
13, 2, 2, 1, 13, 1, 2, 4, 267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1, 52, 15, 2,
1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2 };
System.out.println(arr[a - 1]);
}
}
| JAVA |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | print([0,1,1,1,2,1,2,1,5,2,2,1,5,1,2,1,14,1,5,1,5,2,2,1,15,2,2,5,4,1,4,1,51,1,2,1,14,1,2,2,14,1,6,1,4,2,2,1,52,2,5,1,5,1,15,2,13,2,2,1,13,1,2,4,267,1,4,1,5,1,4,1,50,1,2,3,4,1,6,1,52,15,2,1,15,1,2,1,12,1,10,1,4,2][int(input())]) | PYTHON3 |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | print[0,1,1,1,2,1,2,1,5,2,2,1,5,1,2,1,14,1,5,1,5,2,2,1,15,2,2,5,4,1,4,1,51,1,2,1,14,1,2,2,14,1,6,1,4,2,2,1,52,2,5,1,5,1,15,2,13,2,2,1,13,1,2,4,267,1][input()]
| PYTHON |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | #include <bits/stdc++.h>
using namespace std;
const int a[] = {0, 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1,
14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1,
51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1,
52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4,
267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1,
52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2};
int n;
int main() {
scanf("%d", &n);
printf("%d", a[n]);
return 0;
}
| CPP |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | #include <bits/stdc++.h>
using namespace std;
int main() {
int a[] = {0, 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1,
14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1,
51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1,
52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4,
267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1,
52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2},
x;
cin >> x;
cout << a[x] << endl;
}
| CPP |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | #lol
temmie = [0,1,1,1,2,1,2,1,5,2,2,1,5,1,2,1,14,1,5,1,5,2,2,1,15,2,2,5,4,1,4,1,51,1,2,1,14,1,2,2,14,1,6,1,4,2,2,1,52,2,5,1,5,1,15,2,13,2,2,1,13,1,2,4,267,1,4,1,5,1,4,1,50,1,2,3,4,1,6,1,52,15,2,1,15,1,2,1,12,1,10,1,4,2]
toby = int(input())
print(temmie[toby]) | PYTHON3 |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | #include <bits/stdc++.h>
int num[] = {1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14,
1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51,
1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1, 52,
2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4, 267,
1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1, 52,
15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2};
int main() {
int n;
scanf("%d", &n);
printf("%d", num[n - 1]);
return 0;
}
| CPP |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | #include <bits/stdc++.h>
int A[200] = {0, 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1,
14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1,
51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1,
52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4,
267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1,
52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2, 0};
int main() {
int n;
scanf("%d", &n);
printf("%d", A[n]);
return 0;
}
| CPP |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | #include <bits/stdc++.h>
int num[] = {1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14,
1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51,
1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1, 52,
2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4, 267,
1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1, 52,
15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2};
int main() {
int n;
scanf("%d", &n);
printf("%d", num[n - 1]);
return 0;
}
| CPP |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | #include <bits/stdc++.h>
using namespace std;
const int a[] = {0, 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1,
14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1,
51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1,
52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4,
267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1,
52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2};
int n;
int main() {
cin >> n;
cout << a[n];
return 0;
}
| CPP |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | f = [ 0, 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1, 52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4, 267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1, 52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2]
print f[input()] | PYTHON |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | #include <bits/stdc++.h>
using namespace std;
int n, a[1005] = {0, 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1,
14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1,
51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1,
52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4,
267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1,
52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2};
int main() {
scanf("%d", &n);
printf("%d", a[n]);
return 0;
}
| CPP |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | #include <bits/stdc++.h>
using namespace std;
const int a[] = {0, 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1,
14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1,
51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1,
52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4,
267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1,
52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2};
int main() {
int n;
cin >> n;
cout << a[n];
return 0;
}
| CPP |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | import java.awt.*;
import java.io.*;
import java.math.*;
import java.util.*;
import java.util.Map.Entry;
import static java.lang.Math.*;
public class Solution implements Runnable {
final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;
BufferedReader in;
PrintWriter out;
StringTokenizer tok = new StringTokenizer("");
String delim = "";
String readString() throws IOException {
try {
while(!tok.hasMoreTokens()) {
tok = new StringTokenizer(in.readLine());
}
return tok.nextToken();
}
catch (Exception e){
return null;
}
}
int readInt() throws IOException{
return Integer.parseInt(readString());
}
long readLong() throws IOException{
return Long.parseLong(readString());
}
double readDouble() throws IOException{
return Double.parseDouble(readString());
}
Point readPoint() throws IOException {
return new Point(readInt(), readInt());
}
//----------------------------------
public class Pair<T1,T2> {
public T1 x1;
public T2 x2;
public Pair(){};
public Pair(T1 x1, T2 x2){
this.x1 = x1;
this.x2 = x2;
}
public String toString(){
return x1 + ":" + x2;
}
}
public class Three {
public int x, y, z;
public Three(){}
public Three(int a, int b, int c){x = a;y=b;z=c;}
public String toString(){
return x + ":" + y + ":" + z;
}
}
//----------------------------------------
void solve() throws NumberFormatException, IOException {
TreeMap<Integer, Integer> map = new TreeMap<Integer, Integer>();
map.put(1, 1);
map.put(2, 1);
map.put(3, 1);
map.put(4, 2);
map.put(5, 1);
map.put(6, 2);
map.put(7, 1);
map.put(8, 5);
map.put(9, 2);
map.put(10, 2);
map.put(11, 1);
map.put(12, 5);
map.put(13, 1);
map.put(14, 2);
map.put(15, 1);
map.put(16, 14);
map.put(17, 1);
map.put(18, 5);
map.put(19, 1);
map.put(20, 5);
map.put(21, 2);
map.put(22, 2);
map.put(23, 1);
map.put(24, 15);
map.put(25, 2);
map.put(26, 2);
map.put(27, 5);
map.put(28, 4);
map.put(29, 1);
map.put(30, 4);
map.put(31, 1);
map.put(32, 51);
map.put(33, 1);
map.put(34, 2);
map.put(35, 1);
map.put(36, 14);
map.put(37, 1);
map.put(38, 2);
map.put(39, 2);
map.put(40, 14);
map.put(41, 1);
map.put(42, 6);
map.put(43, 1);
map.put(44, 4);
map.put(45, 2);
map.put(46, 2);
map.put(47, 1);
map.put(48, 52);
map.put(49, 2);
map.put(50, 5);
map.put(51, 1);
map.put(52, 5);
map.put(53, 1);
map.put(54, 15);
map.put(55, 2);
map.put(56, 13);
map.put(57, 2);
map.put(58, 2);
map.put(59, 1);
map.put(60, 13);
map.put(61, 1);
map.put(62, 2);
map.put(63, 4);
map.put(64, 267);
out.println(map.get(readInt()));
}
//----------------------------------------
public static void main(String[] args){
new Thread(null, new Solution(), "", 256 * (1L << 20)).start();
}
public void run(){
try{
timeBegin = System.currentTimeMillis();
try{
if (ONLINE_JUDGE){
in = new BufferedReader(new InputStreamReader(System.in));
out = new PrintWriter(System.out);
}
else {
in = new BufferedReader(new FileReader("input.txt"));
out = new PrintWriter("output.txt");
}
}catch(Throwable e){
in = new BufferedReader(new InputStreamReader(System.in));
out = new PrintWriter(System.out);
}
solve();
out.close();
timeEnd = System.currentTimeMillis();
if (!ONLINE_JUDGE) System.err.println("Time = " + (timeEnd - timeBegin));
}catch (Exception e){
e.printStackTrace(System.err);
System.exit(-1);
}
}
long timeBegin, timeEnd;
} | JAVA |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | import sys
import math
from fractions import Fraction
si = sys.stdin
so = sys.stdout
se = sys.stderr
readLine = raw_input
readArgs = lambda : readLine().split()
readInts = lambda : map(int, readArgs())
readInt = lambda : readInts()[0]
lim = readInt()
data = [0, 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1, 52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4, 267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1, 52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2]
print data[lim]
| PYTHON |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | #include <bits/stdc++.h>
using namespace std;
const short a[93] = {1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14,
1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51,
1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1, 52,
2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4, 267,
1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1, 52,
15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2};
int main(register int S) {
ios::sync_with_stdio(false);
return (cin >> S, cout << a[S - 1]) && 0;
}
| CPP |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | #include <bits/stdc++.h>
using namespace std;
const int a[100] = {0, 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1,
14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1,
51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1,
52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4,
267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1,
52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2};
int main() {
int n;
scanf("%d", &n);
printf("%d\n", a[n]);
return 0;
}
| CPP |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | #include <bits/stdc++.h>
int a[] = {0, 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14,
1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51, 1,
2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1, 52, 2, 5,
1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4, 267};
int main() {
int x;
scanf("%d", &x);
printf("%d\n", a[x]);
return 0;
}
| CPP |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | import java.awt.*;
import java.io.*;
import java.math.*;
import java.util.*;
import java.util.Queue;
public class Main {
static PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out) );
static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
static StringTokenizer st = new StringTokenizer("");
static String next() throws Exception {
while (!st.hasMoreTokens()) {
String s = br.readLine();
if (s == null)
return null;
st = new StringTokenizer(s);
}
return st.nextToken();
}
public static void main(String[] asda) throws Exception {
int N = Integer.parseInt( next() );
int[] a = new int[65];
a[1] = 1;
a[2] = 1;
a[3] = 1;
a[4] = 2;
a[5] = 1;
a[6] = 2;
a[7] = 1;
a[8] = 5;
a[9] = 2;
a[10] = 2;
a[11] = 1;
a[12] = 5;
a[13] = 1;
a[14] = 2;
a[15] = 1;
a[16] = 14;
a[17] = 1;
a[18] = 5;
a[19] = 1;
a[20] = 5;
a[21] = 2;
a[22] = 2;
a[23] = 1;
a[24] = 15;
a[25] = 2;
a[26] = 2;
a[27] = 5;
a[28] = 4;
a[29] = 1;
a[30] = 4;
a[31] = 1;
a[32] = 51;
a[33] = 1;
a[34] = 2;
a[35] = 1;
a[36] = 14;
a[37] = 1;
a[38] = 2;
a[39] = 2;
a[40] = 14;
a[41] = 1;
a[42] = 6;
a[43] = 1;
a[44] = 4;
a[45] = 2;
a[46] = 2;
a[47] = 1;
a[48] = 52;
a[49] = 2;
a[50] = 5;
a[51] = 1;
a[52] = 5;
a[53] = 1;
a[54] = 15;
a[55] = 2;
a[56] = 13;
a[57] = 2;
a[58] = 2;
a[59] = 1;
a[60] = 13;
a[61] = 1;
a[62] = 2;
a[63] = 4;
a[64] = 267;
out.print(a[N]);
//
out.flush();
System.exit(0);
}
}
| JAVA |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | #include <bits/stdc++.h>
using namespace std;
int main() {
int arr[] = {1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14,
1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51,
1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1, 52,
2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4, 267,
1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1, 52,
15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2};
int n;
cin >> n;
cout << arr[n - 1] << endl;
return 0;
}
| CPP |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | #include <bits/stdc++.h>
using namespace std;
int a[] = {0, 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1,
5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51, 1, 2, 1, 14, 1, 2, 2,
14, 1, 6, 1, 4, 2, 2, 1, 52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1,
13, 1, 2, 4, 267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1,
52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2};
int main() {
int n;
cin >> n;
cout << a[n];
}
| CPP |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | #include <bits/stdc++.h>
using namespace std;
const int a[] = {0, 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1,
14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1,
51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1,
52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4,
267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1,
52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2};
int main() {
int n;
cin >> n;
cout << a[n];
return 0;
}
| CPP |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | #include <bits/stdc++.h>
using namespace std;
int main() {
const int a[] = {0, 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1,
14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1,
51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1,
52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4,
267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1,
52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2};
int n;
scanf("%d", &n);
printf("%d", a[n]);
return 0;
}
| CPP |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | #include <bits/stdc++.h>
using namespace std;
int num[] = {0, 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1,
14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1,
51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1,
52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4,
267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1,
52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2};
int main() {
int n;
cin >> n;
cout << num[n] << '\n';
return 0;
}
| CPP |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | import java.io.*;
import java.util.*;
import static java.lang.Math.*;
public class Main extends PrintWriter {
BufferedReader in;
StringTokenizer stok;
final Random rand = new Random(31);
final int inf = (int) 1e9;
final long linf = (long) 1e18;
public void solve() throws IOException {
int[] a = new int[] {1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1, 52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4, 267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1, 52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2};
println(a[nextInt() - 1]);
}
public void run() {
try {
solve();
close();
} catch (Exception e) {
e.printStackTrace();
System.exit(abs(-1));
}
}
Main() throws IOException {
super(System.out);
in = new BufferedReader(new InputStreamReader(System.in));
}
Main(String s) throws IOException {
super("".equals(s) ? "output.txt" : (s + ".out"));
in = new BufferedReader(new FileReader("".equals(s) ? "input.txt" : (s + ".in")));
}
public static void main(String[] args) throws IOException {
try {
Locale.setDefault(Locale.US);
} catch (Exception ignored) {
}
new Main().run();
}
String next() throws IOException {
while (stok == null || !stok.hasMoreTokens()) {
String s = in.readLine();
if (s == null) {
return null;
}
stok = new StringTokenizer(s);
}
return stok.nextToken();
}
int nextInt() throws IOException {
return Integer.parseInt(next());
}
long nextLong() throws IOException {
return Long.parseLong(next());
}
double nextDouble() throws IOException {
return Double.parseDouble(next());
}
int[] nextIntArray(int len) throws IOException {
int[] a = new int[len];
for (int i = 0; i < len; i++) {
a[i] = nextInt();
}
return a;
}
void shuffle(int[] a) {
for (int i = 1; i < a.length; i++) {
int x = rand.nextInt(i + 1);
int t = a[i];
a[i] = a[x];
a[x] = t;
}
}
boolean nextPerm(int[] p) {
for (int a = p.length - 2; a >= 0; --a)
if (p[a] < p[a + 1])
for (int b = p.length - 1; ; --b)
if (p[b] > p[a]) {
int t = p[a];
p[a] = p[b];
p[b] = t;
for (++a, b = p.length - 1; a < b; ++a, --b) {
t = p[a];
p[a] = p[b];
p[b] = t;
}
return true;
}
return false;
}
<T> List<T>[] createAdjacencyList(int countVertex) {
List<T>[] res = new List[countVertex];
for (int i = 0; i < countVertex; i++) {
res[i] = new ArrayList<T>();
}
return res;
}
}
| JAVA |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | import java.util.Scanner;
import java.util.Arrays;
public class codeforces {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int [] a = {0,1,1,1,2,1,2,1,5,2,2,1,5,1,2,1,14,1,5,1,5,2,2,1,
15,2,2,5,4,1,4,1,51,1,2,1,14,1,2,2,14,1,6,1,4,2,2,
1,52,2,5,1,5,1,15,2,13,2,2,1,13,1,2,4,267,1,4,1,5,
1,4,1,50,1,2,3,4,1,6,1,52,15,2,1,15,1,2,1,12,1,10,
1,4,2};
int n = sc.nextInt();
System.out.print(a[n]);
}
} | JAVA |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | #include <bits/stdc++.h>
using namespace std;
int main() {
int a[] = {0, 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1,
14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1,
51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1,
52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4,
267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1,
52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2};
int n;
cin >> n;
cout << a[n];
return 0;
}
| CPP |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | write([0, 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1, 52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4, 267][parseInt(readline())]);
| JAVA |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | const n = Number(readline());
print([0, 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1, 52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4, 267][n]);
| JAVA |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | arr = [0,1,1,1,2,1,2,1,5,2,2,1,5,1,2,1,14,1,5,1,5,2,2,1,15,2,2,5,4,1,4,1,51,1,2,1,14,1,2,2,14,1,6,1,4,2,2,1,52,2,5,1,5,1,15,2,13,2,2,1,13,1,2,4,267,1,4,1,5,1,4,1,50,1,2,3,4,1,6,1,52,15,2,1,15,1,2,1,12,1,10,1,4,2]
n = int(input())
print(arr[n])
#dhytql | PYTHON3 |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | #include <bits/stdc++.h>
int a[1103] = {0, 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1,
14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1,
51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1,
52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4,
267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1,
52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2};
int n;
int main() {
scanf(" %d", &n);
printf("%d", a[n]);
return 0;
}
| CPP |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | # oeis 000001
x = [ 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1, 52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4, 267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1, 52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2]
print(x[int(input()) - 1])
| PYTHON3 |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | n = int(input())
lol = [0, 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1, 52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4, 267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1, 52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2]
print(lol[n]) | PYTHON3 |
409_F. 000001 |
Input
The input contains a single integer a (1 ≤ a ≤ 64).
Output
Output a single integer.
Examples
Input
2
Output
1
Input
4
Output
2
Input
27
Output
5
Input
42
Output
6 | 2 | 12 | #include <bits/stdc++.h>
const int a[] = {0, 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1,
14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1,
51, 1, 2, 1, 14, 1, 2, 2, 14, 1, 6, 1, 4, 2, 2, 1,
52, 2, 5, 1, 5, 1, 15, 2, 13, 2, 2, 1, 13, 1, 2, 4,
267, 1, 4, 1, 5, 1, 4, 1, 50, 1, 2, 3, 4, 1, 6, 1,
52, 15, 2, 1, 15, 1, 2, 1, 12, 1, 10, 1, 4, 2};
int main() {
int i;
scanf("%d", &i);
printf("%d", a[i]);
}
| CPP |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.