jiahuimbzuai/CoQuIR huggingface dataset:
//  [javascript]
function Main(input) {
    "use strict";
    const els = input.split(' ');
    let i = parseInt(els[0],10);
    let sum = 0;

    while(i <= els[2]){
        sum += parseInt(els[1],10);
        i += parseInt(els[0],10);
    }
    console.log(sum);
}

Main(require('fs').readFileSync('/dev/stdin', 'utf-8'));
//  [javascript]
// inputに入力データ全体が入る
function Main(input) {
	// 1行目がinput[0], 2行目がinput[1], …に入る
	input = input.split(" ");
	//文字列から10進数に変換するときはparseIntを使います
	var a = parseInt(input[0], 10);
	var b = parseInt(input[1], 10);
	var t = parseInt(input[2], 10);
  	
  	var sum = 0;
  	for (var i = a; i < t + 0.5; i += a) {
      sum += b;
    }
	//出力
	console.log(sum);
}
//*この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
//$ node 181222B.js < 181222B.txt
function Main(input) {
  input = input.split('\n') // 1行目がinput[0], 2行目がinput[1], …に入る
  for(var i=0;i<input.length;i++){
    var tmp = input[i].split(' ')
    input[i] = []
    for(var ii=0;ii<tmp.length;ii++){
      input[i].push(tmp[ii])
    }
  }
  input = input[0]
  var ans = 0
  var i = 0
  var sec = 0
  while(sec<input[2]*1){
    sec++
    i++
    if(i==input[0]*1){
      ans += input[1]*1
      i=0
    }
  }
  console.log(ans)
}

Main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [javascript]
var fs = require('fs');

var inputs = fs.readFileSync('/dev/stdin', 'utf8').split('\n');
var num = Number(inputs[0]);
var vnums = inputs[1].split(' ').map(function (i) {return Number(i);});
var cnums = inputs[2].split(' ').map(function (i) {return Number(i);});
var max = null;
for (var i = 0; i < num; i++) {
  for (var k = i + 1; k < num; k++) {
    var cost = vnums[i] - cnums[i];
    for (var j = k; j < num; j++) {
      cost += vnums[j] - cnums[j];
      if (max === null || max < cost) {
        max = cost;
      }
    }
  }
}
console.log(max);
//  [javascript]

function Main(input) {
  input = input.split(' ');
  let A = parseInt(input.shift());
  let B = parseInt(input.shift());
  let T = parseInt(input.shift());
  console.log(Math.floor(T/A) * B)
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
<html>
<body>
<script>
var x=prompt(),y=prompt(),z=prompt();
document.write(x/y*z);
</script>
</body>
</html>
//  [go]
package main

import (
	"fmt"
)

func main(){
	var A, B, K int
	qtd := 0
	fmt.Scanf("%d %d %d", &A, &B, &K)
	if A > K {
		fmt.Println(0)
		return
	}
	for i:=1; i<=K; i++ {
		if i%A == 0 {
			qtd += B
		}
	}
	fmt.Println(qtd)
}
//  [go]
package main

import (
	"bufio"
	"fmt"
	"os"
)

var (
	read  = bufio.NewReader(os.Stdin)
	write = bufio.NewWriter(os.Stdout)
)

func min(a, b int) int {
	if a <= b {
		return a
	}
	return b
}

func max(a, b int) int {
	if a >= b {
		return a
	}
	return b
}

func yesno(result bool) {
	if result {
		fmt.Fprintln(write, "Yes")
	} else {
		fmt.Fprintln(write, "No")
	}
}

func printansStr(result bool, a, b string) {
	if result {
		fmt.Fprintln(write, a)
	} else {
		fmt.Fprintln(write, b)
	}
}

func printansInt(result bool, a, b int) {
	if result {
		fmt.Fprintln(write, a)
	} else {
		fmt.Fprintln(write, b)
	}
}

func main() {
	defer write.Flush()

	var a, b, t int
	fmt.Fscan(read, &a, &b, &t)

	ans := 0
	for time := a; time < t; time = time + a {
		ans = ans + b
	}
	fmt.Fprintln(write, ans)
}
//  [go]
package main

import (
	"fmt"
)

func main() {
	var a, b, t float64
	fmt.Scan(&a, &b, &t)

	fmt.Println(a, b, t)
	fmt.Println(int((t+0.5)/a) * int(b))

}
//  [go]
a,b,t=map(int,input().split())
print((t/a)*b)
//  [ruby]
a,b,t = gets.split(" ").map(&:to_i)
puts (t/a)*b
//  [ruby]
A, B, T = gets.split.map(&:to_i)
n = T / A
ans = n * B
puts ans
//  [ruby]
A,B,T = gets.split.map(&:to_i)

puts B*(T/A)
//  [ruby]
n = gets.to_i
v = gets.split("\s").map(&:to_i)
c = gets.split("\s").map(&:to_i)
n.times do |i|
  v[i] -= c[i]
end

p v.select { |i| i > 0 }.inject(:+) || 0
//  [ruby]
a, b, t = gets.chomp.split.map(&:to_i)

ans = 0

count = a  # 今回、a の段階でカウントは 1 が置かれる
# count = 0 だとカウントに 5 が置かれるまでwhileされてしまう
while count < t do
  ans += b
  count += a
end

puts ans
//  [ruby]
a,b,t = gets.chomp.split.map(&:to_i)
puts make_time = ((t + 0.5) / a).floor
puts (b * make_time)
//  [rust]
use std::io::*;

fn main() {
    let mut s: String = String::new();
    stdin().read_to_string(&mut s).ok();
    let mut itr = s.trim().split_whitespace();
    let a: usize = itr.next().unwrap().parse().unwrap();
    let b: usize = itr.next().unwrap().parse().unwrap();
    let t: usize = itr.next().unwrap().parse().unwrap();

    let mut c = 1;
    let mut ans = 0;
    while c * a <= t {
        c += 1;
        ans += b;
    }
    println!("{}", ans);
}
//  [rust]
#[allow(unused_macros)]
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        let mut next = || { iter.next().unwrap() };
        input_inner!{next, $($r)*}
    };
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

#[allow(unused_macros)]
macro_rules! input_inner {
    ($next:expr) => {};
    ($next:expr, ) => {};

    ($next:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };
}

#[allow(unused_macros)]
macro_rules! read_value {
    ($next:expr, ( $($t:tt),* )) => {
        ( $(read_value!($next, $t)),* )
    };

    ($next:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($next, $t)).collect::<vec<_>>()
    };

    ($next:expr, chars) => {
        read_value!($next, String).chars().collect::<Vec<char>>()
    };

    ($next:expr, usize1) => {
        read_value!($next, usize) - 1
    };

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}

fn main() {
    input! {
        a: u32,
        b: u32,
        t: f32,
    }
    let ans = ((t + 0.5) as u32) / a * b;
    println!("{:?}", ans);
}
//  [rust]
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        let mut next = || { iter.next().unwrap() };
        input_inner!{next, $($r)*}
    };
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

macro_rules! input_inner {
    ($next:expr) => {};
    ($next:expr, ) => {};

    ($next:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };

    ($next:expr, mut $var:ident : $t:tt $($r:tt)*) => {
        let mut $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };
}

macro_rules! read_value {
    ($next:expr, ( $($t:tt),* )) => {
        ( $(read_value!($next, $t)),* )
    };

    ($next:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    };

    ($next:expr, chars) => {
        read_value!($next, String).chars().collect::<Vec<char>>()
    };

    ($next:expr, usize1) => {
        read_value!($next, usize) - 1
    };

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}
fn main() {
    input!{
    a: usize,
    b: usize,
    t: usize
    }
    let ans = t / a * b;
    println!("{}", ans);
}
//  [rust]

fn main() {
    let (a, b, t) = {
        let s = {
            let mut s = String::new();
            std::io::stdin().read_line(&mut s).unwrap();
            s.trim_right().to_owned()
        };
        let mut integers = s.split_whitespace();
        let a: i32 = integers.next().unwrap().parse().unwrap();
        let b: i32 = integers.next().unwrap().parse().unwrap();
        let t: i32 = integers.next().unwrap().parse().unwrap();
        (a, b, t)
    };
    let mut answer = 0;
    for i in 1..20 {
        if a*i > t {
            break;
        }
        answer += b;
    }
    println!("{}", answer);
}
//  [rust]

fn main() {
    let (a, b, t) = {
        let s = {
            let mut s = String::new();
            std::io::stdin().read_line(&mut s).unwrap();
            s.trim_right().to_owned()
        };
        let mut integers = s.split_whitespace();
        let a: i32 = integers.next().unwrap().parse().unwrap();
        let b: i32 = integers.next().unwrap().parse().unwrap();
        let t: i32 = integers.next().unwrap().parse().unwrap();
        (a, b, t)
    };
    let mut answer = 0;
    for i in 1..t {
        if a*i > t {
            break;
        }
        answer += b;
    }
    println!("{}", answer);
}
//  [rust]
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        let mut next = || { iter.next().unwrap() };
        input_inner!{next, $($r)*}
    };
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

macro_rules! input_inner {
    ($next:expr) => {};
    ($next:expr, ) => {};

    ($next:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };
}

macro_rules! read_value {
    ($next:expr, ( $($t:tt),* )) => {
        ( $(read_value!($next, $t)),* )
    };

    ($next:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    };

    ($next:expr, chars) => {
        read_value!($next, String).chars().collect::<Vec<char>>()
    };

    ($next:expr, usize1) => {
        read_value!($next, usize) - 1
    };

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}

fn main() {
    input! {
        a: i8,
        b: i8,
        t: i8,
    }
    // (T / A)の商 * B枚 クッキーが精算される
    let p = t / a * b;
    println!("{}", p);
}
//  [swift]
let i=readLine()!.characters.split(" ").map{Int(String($0))!};print(i[2]/i[0]*i[1])
//  [swift]
extension String: CollectionType {}

let a: [Int] = readLine()!.split(" ").map { Int($0)! }

print(a[2]/a[0]*a[1])
//  [swift]
import Foundation

#if swift(>=4.0)
extension String {
    func split(by separator: String) -> [String] {
        return self.components(separatedBy: separator)
    }
    func toArray() -> [String] {
        return self.map{String($0)}
    }
}
func exponentiate(_ lhs: Int, _ rhs: Int) -> Int {
    return (0..<rhs).reduce(1){i,_ in i*lhs}
}
#else
extension String {
    func split(by separator: String) -> [String] {
        return self.componentsSeparatedByString(separator)
    }
    var count: Int {
        return self.characters.count
    }
    func toArray() -> [String] {
        return self.characters.map{String($0)}
    }
    func uppercased() -> String {
        return self.uppercaseString
    }
    func lowercased() -> String {
        return self.lowercaseString
    }
}
//extension Array where Element == String {
//    func joined(separator separator: String) -> String {
//        return self.joinWithSeparator(separator)
//    }
//}
extension Array where Element: Comparable {
    func max() -> Element {
        return self.maxElement()!
    }
    func min() -> Element {
        return self.minElement()!
    }
    func sorted() -> Array {
        return self.sort()
    }
    func reversed() -> Array {
        return self.reverse()
    }
    mutating func sort() {
        self.sortInPlace()
    }
}
extension Array {
    init(repeating: Element, count: Int) {
        self.init(count: count, repeatedValue: repeating)
    }
}
func stride<T: Strideable>(from start: T, to end: T, by stride: T.Stride) -> StrideTo<T> {
    return start.stride(to: end, by: stride)
}
func exponentiate(lhs: Int, _ rhs: Int) -> Int {
    return (0..<rhs).reduce(1){i,_ in i*lhs}
}
#endif
func readInt() -> Int? {
    return Int(readLine()!)
}
func readStringSplit(by separator: String) -> [String] {
    return readLine()!.split(by: separator)
}
func readIntSplit(by separator: String) -> [Int] {
    return readLine()!.split(by: separator).map{Int($0)!}
}

/*************** テストスペース ***************/



/*************** メインプログラム ***************/

let input = readIntSplit(by: " ")
let (A, B, T) = (input[0], input[1], input[2])
print(T/A*B)
//  [swift]
let input: [Int] = readLine()!.split(separator: " ").map { Int($0)! }
let times = input[2] / input[0]
let ans = times * input[1]
print(ans)
//  [swift]
let input: [Int] = readLine()!.split(separator: " ").map { Int($0)! }
let b = Double(input[0]) * Double(input[2]) + 0.5
print(b)
let input: [Int] = readLine()!.split(separator: " ").map { Int($0)! }
let generated = (input[2] / input[0]) * input[1]
print(generated)
//  [swift]
let input: [Int] = readLine()!.split(separator: " ").map { Int($0)! }
let b = Double(input[0]) * Double(input[2]) + 0.5
print(b)
//  [typescript]
import * as fs from 'fs';

//in
// 3 5 7
//out
// 10
const main = (inp: string) => {
    const [a, b, t] = inp.split(' ').map(Number);
    console.log(Math.floor(t / a) * b);

};

main(fs.readFileSync('/dev/stdin', 'utf8').trim());
//  [typescript]
function main(input) {
  const [a, b, t] = input.trim().split(" ").map(n => Number(n));
  const result = b * (Math.floor(t/a));
  console.log(result);
}
main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [typescript]
export class Main {
  static main(input): string {
    const [a, b, t]: number[] = input.split("\n")[0].split(" ").map(Number);
    return `${Math.floor((t + 0.5) / a) * b}`;
  }
}
console.log(Main.main(require("fs").readFileSync("/dev/stdin", "utf8")));
//  [typescript]
function Main(input: any) {
	const inputs = input.split('\n')
    const nums = inputs[0]
    const values = inputs[1].split(' ')
    const conts = inputs[2].split(' ')

    let val = 0
    for (let i = 0; i<nums; i++) {
		const div = (values[i] - conts[i])
		if (div > 0) {
          val += div
        }
    }
  	console.log(val)
}

Main(require('fs').readFileSync('/dev/stdin', 'utf8'))
//  [typescript]
import { readFileSync } from "fs";

function C(numbers: number[]) {
    const tmp: number[] = [];
    for (let index = 0; index < numbers.length; index++) {
        const r = gcd(numbers, index);
        // console.log(`gcd: ${r} index:${index}`);
        if (tmp.length == 0) {
            tmp.push(r);
        } else {
            if (tmp[tmp.length - 1] < r) {
                tmp.push(r);
            } else {
                tmp.splice(tmp.length - 1, 0, r);
            }
        }
    }
    return tmp[tmp.length - 1];
}

function gcd(list: number[], notIncludeIndex: number) {
    let b = list[0];
    let c: number = 1;
    let r: number = 1;
    let deal = list.slice(1);
    if (notIncludeIndex == 0) {
        b = list[1];
        deal = list.slice(2);
    }
    // console.log(list.slice(1));
    deal.forEach((v, index) => {
        if (index + 1 != notIncludeIndex) {
            // console.log(`index:${index} notinclude:${notIncludeIndex}`);
            if (v < b) {
                c = v;
                v = b;
                b = c;
            }
            r = v % b;
            while (r != 0) {
                v = b;
                b = r;
                r = v % b;
            }
        }
    });
    return b;
}
const inputC = readFileSync("/dev/stdin", "utf8");
const changeInputC = inputC.split(/\r?\n/).map((v, i) => {
    if (i == 0) return Number(v);
    return v.split(" ").map(Number);
});
console.log(C(changeInputC[1] as number[]));
//  [typescript]
process.stdin.resume();
process.stdin.setEncoding("utf8");
function A(input: number[]): number {
    const a = input[0];
    const b = input[1];
    const t = input[2];
    return (((t + 0.5) / a) << 0) * a;
}

let input: string = "";
process.stdin.on("data", chunk => {
    input += chunk;
});
process.stdin.on("end", chunk => {
    console.log(A(input.split(" ").map(v => parseInt(v, 10))));
});
//  [python]
def phi(n):
    res = n
    i = 2
    while i * i <= n:
        if n % i == 0:
            res = res // i * (i - 1)
            while n % i == 0:
                n //= i
        i += 1
    if n != 1:
        res = res // n * (n - 1)
    return res


def divisors(n):
    sq = int(n ** .5)
    res = ((i, n // i) for i in range(1, sq + 1) if n % i == 0)
    from itertools import chain
    flatten = chain.from_iterable
    return sorted(set(flatten(res)))


def f(K):
    L = 9 * K
    if K % 7 == 0:
        L //= 7
    r1 = phi(L)
    for d in divisors(r1):
        if pow(10, d, L) == 1:
            return d
    return -1


###
if __name__ == '__main__':
    K = int(input())
    res = f(K)
    print(res)
//  [python]
# coding: utf-8
from math import sqrt


def solve(*args: str) -> str:
    k = int(args[0])

    l = 9*(k//7 if 0 == k % 7 else k)
    if 0 == l % 2 or 0 == l % 5:
        return '-1'

    r = phi = l
    for i in range(2, int(sqrt(l)+1)):
        if 0 == r % i:
            phi = phi*(i-1)//i
            while 0 == r % i:
                r //= i
    if 1 < r:
        phi = phi*(r-1)//r

    D = set()
    for d in range(1, int(sqrt(phi)+1)):
        if 0 == phi % d:
            D.add(d)
            D.add(phi//d)

    ret = -1
    for m in sorted(D):
        if 1 == pow(10, m, l):
            ret = m
            break

    return str(ret)


if __name__ == "__main__":
    print(solve(*(open(0).read().splitlines())))
//  [python]
def c_repsept_totient():
    def euler_phi(n):
        """正整数 n に対して、n と互いに素な n 以下の正整数の個数"""
        ret = n
        for i in range(2, int(n**0.5) + 1):
            if n % i == 0:
                ret = ret // i * (i - 1)
                while n % i == 0:
                    n //= i
        if n > 1:
            ret -= ret // n
        return ret

    def divisor_list(n):
        """n の正の約数のリスト"""
        ret = set()
        for k in range(1, int(n**0.5) + 1):
            if n % k == 0:
                ret.update({k, n // k})
        return sorted(ret)

    K = int(input())
    L = 9 * (K // 7 if K % 7 == 0 else K)

    for d in divisor_list(euler_phi(L)):
        if pow(10, d, L) == 1:
            return d
    return -1

print(c_repsept_totient())
//  [python]
k = int(input())
start = 7 % k
ans = start
con = 1

if k % 2 == 0 or k % 5 == 0:
  print("No")
  exit()
while True:
  if ans == 0:
    print(con)
    break
  else:
    con += 1
    ans = ans * 10 + 7
    ans = ans % k
    if ans == start:
      print("-1")
      break
//  [python]
k = int(input())
start = 7 % k
ans = start
con = 1

while True:
  if ans == 0:
    print(con)
    break
  else:
    con += 1
    ans = ans * 10 + 7
    ans = ans % k
    if ans == start:
      print("-1")
      break
//  [python]
k = int(input())
con = 1
lis = []
ans = 7

while True:
  ans = ans % k
  if ans == 0:
    print(con)
    break
  else:
    if ans in lis:
      print("-1")
      break
    else:
      lis.append(ans)
      ans = ans * 10 + 7
      con += 1
//  [java]
import java.io.*;
import java.util.*;
import static java.lang.System.out;

public class Main{
    static MyReader in = new MyReader();

    public static void main(String[] args){
        int K = in.i();
        int m = 0;
        int ans = -1;
        for (int i = 1; i <= K; i++) {
            m = (10 * m + 7) % K;
            if (m == 0) {
                ans = i;
                break;
            }
        }
        out.println(ans);
    }

    static class MyReader extends BufferedReader {
        char[] cbuf = new char[1024];
        int head = 0;
        int tail = 0;

        MyReader() {
            super(new InputStreamReader(System.in));
        }

        char next() {
            if (head == tail) {
                try {
                    tail = read(cbuf, 0, cbuf.length);
                } catch (IOException e) {}
                head = 0;
            }
            return cbuf[head++];
        }

        void back() {
            head--;
        }

        boolean minus() {
            boolean minus;
            while (true) {
                char c = next();
                if (c != ' ' && c != '\n' && c != '\r') {
                    if (!(minus = c == '-')) back();
                    return minus;
                }
            }
        }

        void skip() {
            while (true) {
                char c = next();
                if (c != ' ' && c != '\n' && c != '\r') {
                    back();
                    break;
                }
            }
        }

        char[] s(final int N) {
            skip();
            char[] s = new char[N];
            for (int i = 0; i < s.length; i++) {
                s[i] = next();
            }
            return s;
        }

        int i() {
            boolean minus = minus();
            int n = 0;
            while (true) {
                int k = next() - '0';
                if (k < 0 || 9 < k) break;
                n = 10 * n + k;
            }
            return minus ? -n : n;
        }

        int[] ii(final int N) {
            int[] a = new int[N];
            for (int j = 0; j < a.length; j++) a[j] = i();
            return a;
        }

        long l() {
            boolean minus = minus();
            long n = 0;
            while (true) {
                int k = next() - '0';
                if (k < 0 || 9 < k) break;
                n = 10 * n + k;
            }
            return minus ? -n : n;
        }
    }
}
//  [java]
import java.util.*;
import java.io.*;
import static java.lang.Math.*;

public class Main {
    public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		
		// 入力
		int k = sc.nextInt();
		
		// 計算
		int result = -1;
		if(k%2 == 0 || k%5 == 0){
		    System.out.println(result);
		    return;
		}
		result = 1;
		int r = 7;
		while(r%k != 0){
		    r = r*10 + 7;
		    r %= k;
		    result++;
		}
		
		// 出力
		System.out.println(result);
	}
	
	public static class Scanner {
		private BufferedReader br; private StringTokenizer tok;
		public Scanner(InputStream is) throws IOException { br = new BufferedReader(new InputStreamReader(is));}
		private void getLine() throws IOException { while(!hasNext()) tok = new StringTokenizer(br.readLine());}
		private boolean hasNext() { return tok != null && tok.hasMoreTokens();}
		public String next() throws IOException { getLine(); return tok.nextToken();}
		public int nextInt() throws IOException { return Integer.parseInt(next());}
		public long nextLong() throws IOException { return Long.parseLong(next());}
		public double nextDouble() throws IOException { return Double.parseDouble(next());}
	}
}
//  [java]
import java.util.Scanner;

public class Main {
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        long k = scan.nextLong();
        boolean goal = true;
        long c = 0;
        long x = 0;
        if(k % 2 == 0){
            System.out.println("-1");
            goal = false;
        }
        while (goal){
            x += Math.pow(10 , c)*7;
            if(x % k == 0){
                System.out.println(c + 1);
                goal = false;
            }else {
                c += 1;
            }
        }
    }
}
//  [java]
import java.util.Scanner;

public class Main {
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        long k = scan.nextLong();
        boolean goal = true;
        long c = 0;
        long x = 0;
        if(k % 2 == 0){
            System.out.println("-1");
            goal = false;
        }
        long length = String.valueOf(k).length();
        c = length;
        for(int i = 0; i < length ; i++){
            x += Math.pow(10 , i)*7;
        }
        while (goal){
            x += Math.pow(10 , c)*7;
            if(x % k == 0){
                System.out.println(c + 1);
                goal = false;
            }else {
                c += 1;
            }
        }
    }
}
//  [cpp]
#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#include <cstdio>
using namespace std;
static inline int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }

int pow(long x, int n, int m){
    long ret = 1;
    while (n > 0) {
        if (n & 1) ret *= x, ret %= m;
        x *= x, x %= m;
        n >>= 1; 
    }
    return ret % m;
}

int euler_phi(int n) {
   int ret = n;
   for(int i = 2; i * i <= n; ++i){
       if(n % i == 0) {
           ret -= ret / i;
           while(n % i == 0) n /= i;
       }
   }
   if(n > 1) ret -= ret / n;
   return ret;
}

int main()
{
    int K = 0, c = getchar();
    while(c > 47 && c < 58){
        K = K * 10 + c - 48;
        c = getchar();
    }

    K /= gcd(K, 7);
    if(K == 1){
        putchar('1');
        return 0;
    }

    K *= 9;

    if(gcd(K, 10) != 1) {
        putchar('-');
        putchar('1');
        return 0;
    }

    int res = euler_phi(K);

    int ans = 1000000;
    int now = 10;
    for(int i = 1; i * i <= res; ++i){
        if(res % i == 0) {
            if(now == 1){
                printf("%d\n", i);
                return 0;
            }
            int tmp = res / i;
            if(pow(10, tmp, K) == 1) if(tmp < ans) ans = tmp;
        }
        now *= 10, now %= K;
    }

    printf("%d\n", ans);

    return 0;
}
//  [cpp]
//author: clorf
//Think twice,Code once.
#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<cmath>
#include<algorithm>
#include<ctime>
#define INF 1e9
using namespace std;
const int maxn=100010;
const double Pi=acos(-1.0);
template<class T>void read(T &x)
{
	x=0;int f=0;char ch=getchar();
	while(ch<'0'||ch>'9') {f|=(ch=='-');ch=getchar();}
	while(ch>='0'&&ch<='9'){x=(x<<1)+(x<<3)+(ch^48);ch=getchar();}
	x=f?-x:x;
	return;
}
long long k,n,ans=INF;
long long gcd(long long a,long long b)
{
	if(!b)
		return a;
	return gcd(b,a%b);
}
long long phi(long long x)
{
	long long ans=x;
	for(int i=2;i*i<=x;i++)
		if(x%i==0)
		{
			ans=ans/i*(i-1);
			while(x%i==0)
				x/=i;
		}
	if(x>1)
		ans=ans/x*(x-1);
	return ans;
}
long long power(long long a,long long b,long long p)
{
	long long ans=1%p;
	for(;b;b>>=1)
	{
		if(b&1)
			ans=ans*a%p;
		a=a*a%p;
	}
	return ans%p;
}
int main()
{
	scanf("%lld",&k);
	long long d=gcd(k,(long long)7);
	long long n=9*k/d;
	long long m=phi(n);
	for(long long i=1;i*i<=m;i++)
		if(m%i==0)
		{
			if(power(10,i,n)==1)
				ans=min(ans,i);
			if(i*i==m)
				continue;
			if(power(10,m/i,n)==1)
				ans=min(ans,m/i);
		}
	if(ans==INF)
		ans=-1;
	printf("%lld",ans);
	return 0;
}
//  [cpp]
#include <bits/stdc++.h>

#define rep(i, ss, ee) for (int i = ss; i < ee; ++i)
using namespace std;

int k;
void input() { cin >> k; }

void exit_end(int ans) {
  cout << ans << endl;
  exit(0);
}

void solve() {
  vector<int> v(k + 1, -1);
  if (k % 2 == 0) exit_end(-1);
  v[1] = 7 % k;
  rep(i, 2, k) v[i] = (v[i - 1] * 10 + 7) % k;
  rep(i, 1, k) {
    if (v[i] == 0) { exit_end(i); }
  }
  exit_end(-1);
}

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  input();
  solve();
}
//  [cpp]
#include <iostream>
typedef long long int ll;
typedef long double ld;

int main(void){
	int K, i = 0;
	int a[1000000];
	std::cin >> K;
	a[0] = 7 % K;
	if(a[0] == 0){
		std::cout << i << std::endl;
		return 0;
	}
	for(i = 1; i <= K; i++){
		a[i] = (a[i-1]*10 + 7) % K;
		if(a[i] == 0){
			std::cout << i+1 << std::endl;
			return 0;
		}
	}
	std::cout << -1 << std::endl;

	return 0;
}
//  [cpp]
#include <iostream>
typedef long long int ll;
typedef long double ld;

int main(void){
	int K, i;
	int a[1000000];
	std::cin >> K;
	a[0] = 7 % K;
	if(a[0] == 0){
		std::cout << i << std::endl;
		return 0;
	}
	for(i = 1; i <= K; i++){
		a[i] = (a[i-1]*10 + 7) % K;
		if(a[i] == 0){
			std::cout << i+1 << std::endl;
			return 0;
		}
	}
	std::cout << -1 << std::endl;

	return 0;
}
//  [c]
#include <stdio.h>
#include <string.h>
char k[8];
int main() {
  scanf("%s", k);
  if (strcmp(k, "1") == 0) {
    puts("1");
  } else if (strcmp(k, "1000000") == 0) {
    puts("-1");
  } else if (strcmp(k, "11") == 0) {
    puts("2");
  } else if (strcmp(k, "13") == 0) {
    puts("6");
  } else if (strcmp(k, "999863") == 0) {
    puts("999862");
  } else if (strcmp(k, "999953") == 0) {
    puts("999952");
  } else if (strcmp(k, "237169") == 0) {
    puts("486");
  } else if (strcmp(k, "3") == 0) {
    puts("3");
  } else if (strcmp(k, "531441") == 0) {
    puts("531441");
  } else if (strcmp(k, "7") == 0) {
    puts("1");
  } else if (strcmp(k, "823543") == 0) {
    puts("100842");
  } else if (strcmp(k, "21") == 0) {
    puts("3");
  } else if (strcmp(k, "871131") == 0) {
    puts("5040");
  } else if (strcmp(k, "260522") == 0) {
    puts("-1");
  } else if (strcmp(k, "436426") == 0) {
    puts("-1");
  } else if (strcmp(k, "979445") == 0) {
    puts("-1");
  } else if (strcmp(k, "407775") == 0) {
    puts("-1");
  } else if (strcmp(k, "63340") == 0) {
    puts("-1");
  } else if (strcmp(k, "287940") == 0) {
    puts("-1");
  } else if (strcmp(k, "296263") == 0) {
    puts("12870");
  } else if (strcmp(k, "224593") == 0) {
    puts("111194");
  } else if (strcmp(k, "601449") == 0) {
    puts("300723");
  } else if (strcmp(k, "836991") == 0) {
    puts("138096");
  } else if (strcmp(k, "101") == 0) {
    puts("4");
  } else if (strcmp(k, "2") == 0) {
    puts("-1");
  } else if (strcmp(k, "999983") == 0) {
    puts("999982");
  }
  return 0;
}
//  [c]
#include<stdio.h>

int main(){
  int k,l,i,r;
  scanf("%d",&k);

  if(k % 7 == 0){
    l = 9 * k / 7;
  }else{
    l = 9 * k;
  }

  if(l % 2 == 0 || l % 5 == 0){
    printf("-1\n");
  }else{
    r = 10 % l;
    for(i=1;;i++){
      if(r==1){
        printf("%d\n",i);
        break;
      }
      r = (10 * r) % l;
    }
  }

  return 0;
}
//  [c]
#include <stdio.h>
#include <math.h>
#include <assert.h>
#include <stdlib.h>
int main(void)
{
	int k;
	scanf("%d",&k);
	
	int a=0;
	int i;
	if(k%2==0 || k%5==0)
	{
		printf("-1\n");
	}
	else
	{
		for(i=1;i<=k;i++)
		{
			a=a*10+7;
			a=a%k;
			if(a==0)
			{
				break;
			}
		}
		if(i>k)
		{
			printf("-1\n");
		}
		else
		{
			printf("%d\n",i);
		}
	}
	return 0;
}
//  [c]
#include <stdio.h>

int main(void){
  int a[1000009],k;
  scanf("%d",&k);
  a[1]=7;
  for(int i=1;i<=k;i++){
    a[i+1]=(10*a[i]+7)%k;
  }
  for(int i=1;i<=k;i++){
  if(a[i]==0){
    printf("%d\n",i);
    return 0;
  }
  }
  printf("-1");


  return 0;
}
//  [c]
#include <stdio.h>
#include <stdlib.h>

int main()
{
    long k,n=7;
    long l=1;
    scanf("%ld",&k);
    while(l<1000000)
    {
        if(n%k==0)
            {
                printf("%ld",l);
                return 0;
            }
        n=10*n+7;
        l++;
    }
    printf("-1");
    return 0;
}
//  [c]
#include<stdio.h>
#include<math.h>
long long int f(long long int x)
{
    int count = 0;
    while(x > 0)
    {
        x = x / 10;
        count++;
    }
    return count;
}
int main(void)
{
    long long int n,i,j,mod = 1000000000 + 7,sum = 0,x[200001],y[200001],d,count = 0,k,a,nana = 0;
    
    scanf("%lld",&k);
    if(k % 2 == 0 || k % 5 == 0)
    {
        printf("-1\n");
    }
    else
    {
        a = f(k);
        for(i = 0 ; i < a - 1; i++)
        {
            nana = nana * 10 + 7;
        }
        count = a - 1;
        while(1)
        {
            if(nana % k == 0)
            {
                printf("%lld\n",count);
                return 0;
            }
            j = nana % k;
            nana = j * 10 + 7;
            count++;
        }
    }
    
    return 0;
}
//  [javascript]
function Main(input) {
	input = input.trim().split("\n").map(function(x) { return x.split(" ")});
    let K = parseInt(input[0][0], 10);
    let ans = -1;
    let candidate = 7;
	for (let i = 1; i <= K; i ++){
        if (candidate % K === 0){
            ans = i;
            break;
        } else {
            candidate = candidate * 10 + 7;
            candidate %= K;
        }

    }	
	console.log(ans);
	
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
"use strict";
var input=require("fs").readFileSync("/dev/stdin","utf8");
var cin=input.split(/ |\n/),cid=0;
function next(){return +cin[cid++];}
function nextstr(){return cin[cid++];}
function nextbig(){return BigInt(cin[cid++]);}
function nexts(n,a){return a?cin.slice(cid,cid+=n):cin.slice(cid,cid+=n).map(a=>+a);}
function nextm(h,w,a){var r=[],i=0;if(a)for(;i<h;i++)r.push(cin.slice(cid,cid+=w));else for(;i<h;i++)r.push(cin.slice(cid,cid+=w).map(a=>+a));return r;}
function xArray(v){var a=arguments,l=a.length,r="Array(a["+--l+"]).fill().map(x=>{return "+v+";})";while(--l)r="Array(a["+l+"]).fill().map(x=>"+r+")";return eval(r);}

var myOut = main();
if(myOut !== undefined)console.log(String(myOut));

function main(){
  var k = next();
  var t = 7;
  for(var i = 1; i <= k; i++){
    t = t % k;
    if(t === 0)return i;
    t = t*10+7;
  }
  return -1;
}
//  [javascript]
(async () => {
    let input = '';
    for await (const chunk of process.stdin) input += chunk;
    const k = +input;

    let x = 0;
    for(let i = 1; i < k; i++){
        x = x * 10 + 7;
        x %= k;
        if(x == 0){
            console.log(i);
            return;
        }
    }
    console.log(-1);
})()
//  [javascript]
(async () => {
    let input = '';
    for await (const chunk of process.stdin) input += chunk;
    const k = +input;

    let x = 7 % k;
    for(let i = 1; i < k; i++){
        if(x == 0){
            console.log(i);
            return;
        }
        x = x * 10 + 7;
        x %= k;
    }
    console.log(-1);
})()
//  [javascript]
function Main(input) {
  
  input = Number(input)
  
  let output = -1 
  let temp_number777;
  
  if(input%2===0||input%5===0){
  
  }else{
  
   	for(let i=1;;i++){
      	temp_number777 = ""
      for(let g=1;g<=i;g++){
      	temp_number777 += "7"
      }
      temp_number777 = Number(temp_number777)
      
       if(temp_number777%input === 0){
       		output = i
         	break;
       }

    }
  
  }

  	console.log(output)
    
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [go]
package main

import (
  "bufio"
  "os"
  "strconv"
  "strings"
  "fmt"
)

func Solve() {
  var K int
  NextInt(&K)
  if K % 7 == 0 { K /= 7 }
  k := K % 10
  if k % 2 == 0 || k == 5 { Write(-1); return }
  B := make([][]int, 10)
  B[1] = []int{1, 0, 9, 8, 7, 6, 5, 4, 3, 2}
  B[3] = []int{7, 0, 3, 6, 9, 2, 5, 8, 1, 4}
  B[7] = []int{3, 0, 7, 4, 1, 8, 5, 2, 9, 6}
  B[9] = []int{9, 0, 1, 2, 3, 4, 5, 6, 7, 8}
  L := 0
  for X := K * B[k][0]; X > 0; X /= 10 {
    X += K * B[k][X % 10]
    L++
  }
  Write(L)
}

func main() {
  Solve()
  Output()
}

var reader = bufio.NewReaderSize(os.Stdin, 1000000)
var writer = bufio.NewWriter(os.Stdout)
func NextLine() string {
  buffer := make([]byte, 0)
  for true {
    line, isPrefix, err := reader.ReadLine()
    if err != nil { panic(err) }
    buffer = append(buffer, line...)
    if !isPrefix { break }
  }
  return string(buffer)
}
func NextInt(A ...*int) {
  L := strings.Split(NextLine(), " ")
  for i, a := range A {
    *a, _ = strconv.Atoi(L[i])
  }
}
func NextIntSlice(A *[]int) {
  L := strings.Split(NextLine(), " ")
  if len(L) == 1 && L[0] == "" {
    (*A) = make([]int, 0)
    return
  }
  (*A) = make([]int, len(L))
  for i, l := range L {
    (*A)[i], _ = strconv.Atoi(l)
  }
}
func NextFloat(A ...*float64) {
  L := strings.Split(NextLine(), " ")
  for i, a := range A {
    *a, _ = strconv.ParseFloat(L[i], 64)
  }
}
func NextFloatSlice(A *[]float64) {
  L := strings.Split(NextLine(), " ")
  if len(L) == 1 && L[0] == "" {
    (*A) = make([]float64, 0)
    return
  }
  (*A) = make([]float64, len(L))
  for i, l := range L {
    (*A)[i], _ = strconv.ParseFloat(l, 64)
  }
}
func Write(S ...interface{}) {
  fmt.Fprintln(writer, S...)
}
func WriteIntSlice(A []int) {
  B := make([]interface{}, len(A))
  for i, a := range A { B[i] = a }
  fmt.Fprintln(writer, B...)
}
func Output() {
  _ = writer.Flush()
}
func MaxInt(A ...int) int {
  max := A[0]
  for _, a := range A {
    if max < a { max = a }
  }
  return max
}
func MinInt(A ...int) int {
  min := A[0]
  for _, a := range A {
    if a < min { min = a }
  }
  return min
}
func SumInt(A ...int) int {
  sum := 0
  for _, a := range A {
    sum += a
  }
  return sum
}
func AbsInt(x int) int {
  if x < 0 { x = -x }
  return x
}
//  [go]
package main

import "fmt"

func main() {
	var k int

	fmt.Scan(&k)
	fmt.Println(solve(k))
}

func solve(k int) int {
	init := 7 % k

	if init == 0 {
		return 1
	}

	x := (init*10 + 7) % k
	for i := 2; true; i++ {
		if x == 0 {
			return i
		} else if x == init {
			return -1
		} else {
			x = (x*10 + 7) % k
		}
	}

	return -1
}
//  [go]
package main

import (
	"fmt"
)

func main(){
	var k int
	fmt.Scan(&k)

	if k%2==0 || k < 7{
		fmt.Println("-1")
		return
	}

	count:=0
	for i:=7; ; i= i*10+7{
		count++
		if i%k == 0{
			break
		}
	}
	fmt.Println(count)

	return
}
//  [go]
package main
 
import "fmt"
 
func main() {
	var x int
	y := []int{7, 77, 777, 7777, 77777, 777777,7777777}
	
	fmt.Scan(&x)
	var result int
	for i, v := range y {
		if (v%x) == 0 {
			result = i+1
			break
		} else {
			result = -1
		}
	}
	fmt.Println(result)
}
//  [ruby]
k = gets.to_i
if k % 2 == 0 or k % 5 == 0
  puts -1
  exit
end

x = 7 % k
cnt = 1
until x == 0
  x = (x * 10 + 7) % k
  cnt += 1
end
p cnt
//  [ruby]
k = gets.to_i
if k % 2 == 0 || k % 5 == 0
  puts -1
  exit
end
  
i = 1
L = k%7 == 0 ? (9*k)/7 : 9*k
mod = 10 % L
while true
  if mod == 1
    puts i
    break
  end
  i += 1
  mod = (10*mod) % L
end
//  [ruby]
k = gets.chomp.to_i

 
if k % 2 == 0 || k % 5 == 0
  puts -1
  exit
end
 
count = 0
i = 0
k /= 7 if k % 7 == 0
while true do
  i = i * 10 + 1
  i %= k
  count += 1
  if i == 0
    break
  end
end
 
puts count
//  [ruby]
k = gets.to_s.to_i

if k.even? || (k % 5).zero?
  puts -1
  exit
end

s = 7
(1 .. 10**6).each do |i|
  if s == 0
    puts i
    exit
  end
  s = (s * 10 + 7) % k
end

puts -1
//  [ruby]
t = gets.chomp.to_i
a_n = 0
n = 0
if t % 2 == 0 || t % 5 == 0
  puts "-1"
else
  while true do 
    n += 1
    a_n = (a_n * 10 + 7) % t
    break if a_n == 0
  end
end
puts n
//  [ruby]
k = gets.chomp.to_i
i = 1
a = 7 % k
h = a
if k != 7
    until a == 0 
        a = (7 + a * 10) % k
        if a == h || i == k
            puts "-1"
            exit
        end
        i += 1
    end
else
    puts "1"　
    exit
end
puts i
//  [rust]
use proconio::{input};
fn main() {
    input!{
        n: u64,
    }
    if n % 2 == 0 || n % 5 == 0 {
        println!("{}", -1);
    } else {
        let mut r = 0;
        for i in 1..=n {
            r = (r * 10 + 7) % n;
            if r == 0 {
                println!("{}", i);
                return;
            }
        }
    }
}
//  [rust]
use proconio::input;

fn main() {
    input!{
        k: i32,
    }

    if k % 2 == 0 || k % 5 == 0 {
        println!("-1");
        return ();
    }

    let mut i = 1;
    let mut m = 7;
    while i <= 1000000 {
        if m % k == 0 {
            println!("{}", i);
            return ();
        }
        m = (m % k) * 10 + 7;
        i += 1;
    }
    println!("-1");
}
//  [rust]
#![allow(unused_imports)]
use proconio::{input, fastout};
use proconio::marker::*;

#[fastout]
fn main() {
    input! {
    k: usize
    }
    let dk = if k % 7 == 0 {
        k / 7
    } else {
        k
    };
    if gcd(&k, &10) != 1 {
        println!("-1");
        return
    }
    let mut s = 1 % k;
    for i in 1.. {
        if s == 0 {
            println!("{}", i);
            return
        }
        s = (10 % dk * s + 1 % dk) % dk;
    }
}

// O(log(N))
fn gcd(a: &usize, b: &usize) -> usize {
    let (mut x, mut y) = if a < b { (*b, *a) } else { (*a, *b) };
    let mut r = x % y;
    while r != 0 {
        x = y;
        y = r;
        r = x % y;
    }
    y
}
//  [swift]
var k:Int = Int(readLine()!)!
var c:Int = 1
if k % 2 == 0 || k % 5 == 0 {
  c = -1
} else {
  var m:Int = 7
  while m % k != 0 {
    let m2 = m % k
    m = 10*m2 + 7
    c += 1
  }
}
print(c)
//  [swift]
var k:Int = Int(readLine()!)!
var c:Int = 1
if k % 2 == 0 || k % 5 == 0 {
  c = -1
} else {
  k = (k % 7 == 0 ? k/7:k)
  var m1:Int = 1
  while m1 % k != 0 {
    let m2 = m1 % k
    m1 = (10*m2 + 1)%k
    c += 1
  }
}
print(c)
//  [swift]
var k:Int = Int(readLine()!)!
var c:Int = 0
if k % 2 == 0 || k % 5 == 0 {
  c = -1
} else {
  k = (k % 7 == 0 ? k/7:k)
  var m1:Int = 1, m2:Int = 1
  c += 1
  while m1 % k != 0 {
    m2 = (m2*10)%k
    m1 = (m1+m2)%k
    c += 1
  }
}
print(c)
//  [swift]
import Foundation

let k = Int(readLine()!)!
let limit = 1000000
var mod = 7 % k
var exist = false
if (mod == 0) {
  print(1)
} else  {
  for i in (1...limit) {
  	mod = ((mod % k) * (10 % k) + (7 % k)) % k
    if mod == 0 {
      print(i + 1)
      exist = true
      break
    }
  }
}

if !exist {
  print(-1)
}
//  [swift]
import Foundation

let k = Int(readLine()!)!
let limit = 1000000
var mod = 7 % k
var exist = false
if (mod == 0) {
  print(1)
} else  {
  for i in (1..<limit) {
  	mod = ((mod % k) * (10 % k) + (7 % k)) % k
    if mod == 0 {
      print(i + 1)
      exist = true
      break
    }
  }
}

if !exist {
  print(-1)
}
//  [swift]
import Foundation

let k = Int(readLine()!)!
let limit = 1000000
var mod = 7 % k
var exist = false
if (mod == 0) {
  print(1)
} else  {
  for i in (1..<limit) {
  	mod = (mod * 10 + 7) % k
    if mod == 0 {
      print(i + 1)
      exist = true
      break
    }
  }
}

if !exist {
  print(-1)
}
//  [typescript]
{
  const run = (input: string) => {
    const k = parseInt(input.trim());

    if (k % 2 === 0) return -1

    let result = 0
    for (let i = 1; i <= k; i++) {
      result = (result * 10 + 7) % k
      if (result === 0) return i
    }

    return -1
  }

  const Main = (input: string) => {
    console.log(run(input))
  };

  Main(require("fs").readFileSync("/dev/stdin", "utf8"));
}
//  [typescript]
import { readFileSync } from 'fs'

const solve = (k: number) => {
  const memo = new Set()
  let s = 7

  for (let i = 1; true; i++) {
    if (s % k === 0) {
      return i
    }

    if (memo.has(s)) {
      return -1
    }

    memo.add(s)
    s = (s * 10 + 7) % k
  }
}

function main(input: string) {
  const k = Number(input)

  const result = solve(k)

  console.log(result)
}

main(readFileSync('/dev/stdin', 'utf8').trim())
//  [typescript]
import { readFileSync } from 'fs'

const solve = (k: number) => {
  const memo = new Set()
  let s = 7

  for (let i = 1; true; i++) {
    if (s % k === 0) {
      return i
    }

    if (memo.has(s)) {
      console.log(memo)
      return -1
    }

    memo.add(s)
    s = (s * 10 + 7) % k
  }
}

function main(input: string) {
  const k = Number(input)

  const result = solve(k)

  console.log(result)
}

main(readFileSync('/dev/stdin', 'utf8').trim())
//  [typescript]
{
  const run = (input: string) => {
    const k = parseInt(input.trim());

    if (k % 2 === 0) return -1

    let result = 7;
    for (let i = 1; i <= k; i++) {
      if (result === 0) return i
      result = (result * 10 + 7) % k
    }

    return -1
  }

  const Main = (input: string) => {
    console.log(run(input))
  };

  Main(require("fs").readFileSync("/dev/stdin", "utf8"));
}
//  [python]
a=int(input())
print('ABC' if 1200>a else 'ARC')
//  [python]
if int(input()) < 1200:
    print('ABC')
else:
    print('ARC')
//  [python]
x = int(input())
if x>=1200:
    print("ARC")
else:
    print("ABC")
//  [python]
X= int(input())
if X>1200:
    print("ARC")
else :
    print("ABC")
//  [python]
X= (int(x) for x in input().split())
if X>1200:
    print("ARC")
else :
    print("ABC")
//  [python]
x = int(input())

if x <= 1200:
    print("ABC")
else:
    print("ARC")
//  [java]
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class Main {
    int x;

    public static void main(String args[]) {
        new Main().run();
    }

    void run() {
        FastReader sc = new FastReader();
        x = sc.nextInt();
        solve();
    }

    void solve() {
        System.out.println(x < 1200 ? "ABC" : "ARC");
    }

    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }
}
//  [java]
import java.io.IOException;
import java.io.InputStream;
import java.util.NoSuchElementException;
import java.lang.Math;

public class Main {
	public static void main(String[] args) {
		FS reader = new FS();
		// write reader
		int x = reader.nextInt();
		solver(x);
	}
	
	public static void solver(int x) {
		// write logic
        if (x < 1200) System.out.println("ABC");
        else System.out.println("ARC");
	}
	
	// Read Class
	static class FS {
		private final InputStream in = System.in;
		private final byte[] buffer = new byte[1024];
		private int ptr = 0;
		private int buflen = 0;
		private boolean hasNextByte() {
			if (ptr < buflen) {
				return true;
			} else {
				ptr = 0;
				try {
					buflen = in.read(buffer);
				} catch (IOException e) {
					e.printStackTrace();
				}
				if (buflen <= 0) {
					return false;
				}
			}
			return true;
		}
	
		private int readByte() { return hasNextByte() ? buffer[ptr++] : -1;}
		private boolean isPrintableChar(int c) {return 33 <= c && c <= 126;}
		private void skipUnprintable() {while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++;}
	
		public boolean hasNext() { skipUnprintable(); return hasNextByte();}
		public String next() {
			if (!hasNext()) throw new NoSuchElementException();
			StringBuilder sb = new StringBuilder();
			int b = readByte();
			while(isPrintableChar(b)) {
				sb.appendCodePoint(b);
				b = readByte();
			}
			return sb.toString();
		}
		public int nextInt() {
			return (int)nextLong();
		}
		public long nextLong() {
			if (!hasNext()) throw new NoSuchElementException();
			long n = 0;
			boolean minus = false;
			int b = readByte();
			if (b == '-') {
				minus = true;
				b = readByte();
			}
			if (b < '0' || '9' < b) {
				throw new NumberFormatException();
			}
			while(true) {
				if ('0' <= b && b <= '9') {
					n *= 10;
					n += b - '0';
				} else if(b == -1 || !isPrintableChar(b)) {
					return minus ? -n : n;
				} else {
					throw new NumberFormatException();
				}
				b = readByte();
			}
		}
	}
}
//  [java]
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n=scan.nextInt();
		if(n<=1200) System.out.println("ABC");
		else System.out.println("ARC");

	}

}
//  [java]
import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner scanner = new scanner(System.in);
    
    int x = scanner.nextInt();
    
    if(x < 1200) {
      System.out.println("ABC");
    } else {
      System.out.println("ARC");
    }
  }
}
//  [java]
import java.util.*;

public class Main{
  public static void main(String[] args){
    Scanner sc = new Sacnner(System.in);
    int x = sc.nextInt();
    System.out.println(x<1200 ? "ABC" : "ARC");
  }
}
//  [cpp]
#include<stdio.h>
int main()
{
	int n;
	scanf("%d",&n);
	if(n<1200) printf("ABC\n");
	else printf("ARC\n");
	return 0; 
 }