akhauriyash/Code-Regression huggingface dataset:
#include <iostream>
#include <cstdio>
#include <string>
#include <cstring>
#include <deque>
#include <list>
#include <queue>
#include <stack>
#include <vector>
#include <utility>
#include <algorithm>
#include <map>
#include <set>
#include <complex>
#include <cmath>
#include <limits>
#include <climits>
#include <ctime>
#include <cassert>
#include <numeric>
#include <functional>
#include <bitset>

using namespace std;
using lint = long long int;
using ll = long long int;
using graph = vector<vector<int>>;
using wgraph = vector<vector<pair<int, lint>>>;
const lint INF = 1001001001001001LL;
const lint MOD = 1000000007LL;
const double PI = 3.1415926535897932;
int di[] = {-1, 0, 1, 0, -1, 1, 1, -1};
int dj[] = {0, 1, 0, -1, 1, 1, -1, -1};

void yes(){ cout << "yes" << endl; }
void Yes(){ cout << "Yes" << endl; }
void YES(){ cout << "YES" << endl; }
void no(){ cout << "no" << endl; }
void No(){ cout << "No" << endl; }
void NO(){ cout << "NO" << endl; }
void possible(){ cout << "possible" << endl; }
void Possible(){ cout << "Possible" << endl; }
void POSSIBLE(){ cout << "POSSIBLE" << endl; }
void impossible(){ cout << "impossible" << endl; }
void Impossible(){ cout << "Impossible" << endl; }
void IMPOSSIBLE(){ cout << "IMPOSSIBLE" << endl; }

#define rep(i,n) for(int i = 0; i < (n); i++)
#define rrep(i,n) for(int i = 1; i <= (n); i++)
#define drep(i,n) for(int i = (n)-1; i >= 0; i--)
#define srep(i,s,t) for(int i = s; i < t; i++)
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()


// 抽象二次元累積和
// 構築 O(hw), get O(1)
// TODO verify (https://atcoder.jp/contests/arc089/tasks/arc089_b)

//       ^
//       u
//  <= l   r =>
//       d
//       v      

template<typename T>
struct RecSum{
private: 
  size_t h, w;
  vector<vector<T>> dat;

public: 
  RecSum(vector<vector<T>> v){
    h = v.size();
    w = v[0].size();
    dat.resize(h + 1);
    for(size_t i = 0; i < h + 1; i++) dat[i].resize(w + 1, 0);
    for(size_t i = 0; i < h; i++){
      for(size_t j = 0; j < w; j++){
        dat[i + 1][j + 1] = v[i][j] + dat[i + 1][j];
      }
    }
    for(size_t j = 0; j < w; j++){
      for(size_t i = 0; i < h; i++){
        dat[i + 1][j + 1] += dat[i][j + 1];
      }
    }
  }

  T get(size_t l, size_t r, size_t u, size_t d){ // 0-indexed, [l, r), [u, d)
    return dat[d][r] - dat[u][r] - dat[d][l] + dat[u][l];
  }
};


int main(){
  
  lint n, m, q; cin >> n >> m >> q;
  vector<vector<lint>> data(n + 1, vector<lint> (n + 1, 0));
  rep(i, m){
    lint l, r; cin >> l >> r;
    data[l][r]++;
  }

  RecSum<lint> rs(data);
  rep(i, q){
    lint l, r; cin >> l >> r;
    cout << rs.get(l, r + 1, l, r + 1) << endl;
  }
  return 0;
}


Measured memory_bytes: 6912
#include <bits/stdc++.h>
using namespace std;

int main(){
  int N,M,sum=0;
  cin >> N >> M;
  
  vector<int> vec1(M);
  vector<int> vec2(M);
  
  for(int i=0; i<M ;i++)
    cin >> vec1.at(i) >> vec2.at(i);
  
  for(int i=1; i<=N; i++){
    sum=0;
    for(int j=0; j<M; j++){
      if(vec1.at(j)==i)
          sum++;
      if(vec2.at(j)==i)
          sum++;
    }
    cout << sum << endl;
  }
}

Measured memory_bytes: 256
#include <iostream>
#include <algorithm>
#include <cstring>
#include <cmath>
#include <vector>
#include <set>
#include <queue>
#include <map>
#include <string>

#define rep(i, a, b) for ( int i = (a); i < (b); i++ )
#define per(i, a, b) for ( int i = (b)-1; i >= (a); i--)
#define pb push_back
#define mp make_pair
#define bg begin()
#define en end()


using namespace std;

typedef long long ll;

static const long long MOD = 1000000007;

int ans;


int main(void) {
    string s;
    cin >> s;
    if (s=="AAA" || s=="BBB") puts("No");
    else puts("Yes");

	return 0;
}


Measured memory_bytes: 384
// スタックサイズ: 100MB

#include <iostream>
#include <fstream>
#include <vector>
#include <map>
#include <unordered_map>
#include <string>
#include <cmath>
#include <cstdio>
#include <algorithm>
#include <functional>
#include <numeric>
#include <iomanip>
#include <queue>
#include <list>
#include <set>
using namespace std;

typedef long long ll;
typedef vector<ll> vll;
typedef pair<ll, ll> pll;
const ll INF = 1000000000000000000;
#define fori(i, a, b) for (ll i = (a); i < (b); ++i)
#define ford(i, a, b) for (ll i = (b - 1); (a) <= i; --i)
#define rep(i, n) fori(i, 0, n)
#define all(v) (v).begin(), (v).end()
ll pw(ll x, ll y) { ll r = 1;  rep(i, y) { r *= x; }; return r; }


int main() {
	
	ll a, b, k;
	cin >> a >> b >> k;
	if (b - a < 2 * k) {
		fori(i, a, b + 1) cout << i << endl;
	}
	else {
		fori(i, a, a + k) cout << i << endl;
		fori(i, b - k + 1, b + 1) cout << i << endl;
	}
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;

int main() {

  	int a, b;
   cin >> a >> b;
  int X; 
 	X = (a + b) % 2;
      
   if (X > 0) {
     cout << (a + b) / 2 + 1 << endl;
   }
   else {
     cout << (a + b) / 2 << endl;
   }
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;

#ifdef LOCAL
#define debug(var) cerr << #var << " = " << var << endl;
#else
#define debug(var)
#endif

void init() {
	ios_base::sync_with_stdio(0);
	cin.tie(0);
}

void solve() {
	int l, r; scanf("%d%d", &l, &r);
	if (r-l >= 2019) {
		printf("0");
		return;
	}
	long long ans = 2020;
	for (long long i = l; i <= r; ++i) {
		for (int j = i+1; j <= r; ++j) {
			ans = min(ans, i*j%2019);
		}
	}
	printf("%lld", ans);
}

int main() {
	init();
	int t = 1; //scanf("%d", &t);
	while (t--) {
		solve();
	}
	return 0;
}


Measured memory_bytes: 256
/* Simplicity and Goodness */

#include <bits/stdc++.h>
using namespace std;
#define scn(n) scanf("%d",&n)
#define lscn(n) scanf("%lld",&n)
#define lpri(n) printf("%lld ",n)
#define pri(n) printf("%d ",(int)n)
#define prin(n) printf("%d\n",(int)n)
#define lprin(n) printf("%lld\n",n)
#define deb(x) cout << #x << ' ' << x << '\n'
#define rep(i,ini,n) for(int i=ini;i<(int)n;i++)
#define per(i,ini) for(int i=ini;i>=0;i--)
#define tc int tt; scn(tt); while(tt --)
#define pb push_back
#define mp make_pair
#define F first
#define S second
using ll = long long;
const int inf = INT_MAX;
const int ninf = INT_MIN;
const int mod = 1e9+7;
const int N = 1e5+2;


int main()
{
    int n, m, x;
    scanf("%d%d%d", &n, &m, &x);

    int a[n][m], cost[n];

    rep(i, 0, n)
    {
    	scn(cost[i]);

    	rep(j, 0, m)
    	scn(a[i][j]);
    }

    int ans = inf;

    rep(i, 1, 1<<n)
    {
    	vector<int> fa(m, 0); int here = 0;

    	rep(j, 0, n)
    	if(i & (1<<j))
    	{
    		here += cost[j];

    		rep(k, 0, m)
    		fa[k] += a[j][k];
    	}

    	bool ok = 1;

    	rep(k, 0, m)
    	if(fa[k] < x)
    	ok = 0;

    	if(ok)
    	ans = min(ans, here);
    }

    if(ans == inf)
    ans = -1;

    prin(ans);

    return 0; 
}

Measured memory_bytes: 3836
#include <bits/stdc++.h>
using namespace std;

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef vector<bool> VB;

//REPEAT
//------------------------------------------
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define REP(i,n)  FOR(i,0,n)

//container util
//------------------------------------------
#define pb(a) push_back(a)
#define SORT(V) sort((V).begin(),(V).end())

//constant
//------------------------------------------
const int MOD = 1000000007;
const int INF = 1061109567;
const double EPS = 1e-10;
const double PI  = acos(-1.0);
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};

//main
//------------------------------------------

int main(){
  int N;
  string s;

  cin >> N;
  cin >> s;

  int count = 0;

  REP(i, N){
    if(s.at(i)=='B'){
      count++;
    }
  }

  if(count<(N-count)){
    cout << "Yes" << endl;
  }
  else{
    cout << "No" << endl;
  }
  }


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;

#define ll long long
#define endl "\n"
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);

const int mod = 1e9 + 7;
const int MAX = 2e5 + 1;

int func(string S1, string S2)
{
	int n = S1.size(), m = S2.size();

	int ans = INT_MAX;

	for (int i = 0; i < m - n + 1; i++)
	{
		int minRemovedChar = 0;
		for (int j = 0; j < n; j++)
		{
			if (S1[j] != S2[i + j])
			{
				minRemovedChar++;
			}
		}
		ans = min(minRemovedChar, ans);
	}
	return ans;
}

void solve()
{
	string s, t;
	cin >> s >> t;
	cout << func(t, s);
}

int main()
{
	IOS
	int t = 1;
	//cin >> t;
	while(t--)
	{
		solve();
	}
	return 0;
}


Measured memory_bytes: 3648
#include<iostream>
using namespace std;
int main(){
  int a,b,c;
  cin>>a>>b>>c;
  if(a%3==0||b%3==0||(a+b)%3==0){
    cout<<"Possible"<<endl;
  }
  else{
    cout<<"Impossible"<<endl;
  }
  return 0;
}

Measured memory_bytes: 256
using System;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
using System.Text;
using static System.Console;
using static System.Math;

namespace AtCoder
{
    class Program
    {
        static void Main(string[] args)
        {
            var L = ReadInt();
            WriteLine(L * L * L / 27.0);
        }

        private static string Read() { return ReadLine(); }
        private static string[] Reads() { return (Read().Split()); }
        private static int ReadInt() { return int.Parse(Read()); }
        private static long ReadLong() { return long.Parse(Read()); }
        private static double ReadDouble() { return double.Parse(Read()); }
        private static int[] ReadInts() { return Array.ConvertAll(Read().Split(), int.Parse); }
        private static long[] ReadLongs() { return Array.ConvertAll(Read().Split(), long.Parse); }
        private static double[] ReadDoubles() { return Array.ConvertAll(Read().Split(), double.Parse); }
    }
}


Measured memory_bytes: 11092
#include<iostream>
using namespace std;
int main() {
	int A, B, ans = 0;
	cin >> A >> B;
	for (int i = A; i <= B; i++) {
		if (i / 10000 == i % 10 && i / 1000 % 10 == i % 100 / 10) ans++;
	}
	cout << ans << endl;
	return 0;
}

Measured memory_bytes: 256
S = input()
N = len(S)
MOD = 10**9 + 7
"""
dp[i+1][j] : Sのi文字目まで見たときに、13で割って余りがjになるものの個数

遷移
i-1まで見たときの余りがjの個数がdp[i][j]
iまで見るとi-1までの部分を13でわった余りも10倍されるから、10*j
数字の後ろにS[i]が追加されるので 10*j + S[i]になり、これを13で割った余ると
S[i][j] -> S[i+1][(10*j + S[i]) % 13] みたいな遷移になる

"""
dp = [[0 for _ in range(13)] for _ in range(N+1)]
dp[0][0] = 1


for i in range(N):
    for j in range(13):
        if S[i] == "?":
            for k in range(10): # ?に0~9
                dp[i+1][(10*j + k) % 13] += dp[i][j]
                dp[i+1][(10*j + k) % 13] %= MOD

        else:
            dp[i+1][(10*j + int(S[i])) % 13] += dp[i][j]
            dp[i+1][(10*j + int(S[i])) % 13] %= MOD



print(dp[-1][5])


Measured memory_bytes: 66140
#include <iostream>
#include <bitset>
#include <string>
#include <algorithm>
#include <vector>
#define REP(i, n) for(int i = 0; i < (n); i++)
#define ALL(c) c.begin(),c.end()
#define PB push_back
#define INF 1100000000
#define LLINF 1100000000000000000
#define MOD 1000000007
#define FI first
#define SE second
#define MP make_pair

using namespace std;
typedef long long ll;


int main()
{
  int N, M;
  cin >> N >> M;
  vector<vector<bool>> ajmt(N, vector<bool>(N));
  REP(i, M) {
    int a, b; cin >> a >> b;
    a--, b--;
    ajmt[a][b] = ajmt[b][a] = true;
  }

  vector<int> v(N);
  REP(i, N) v[i] = i;
  int ans = 0;
  do {
    bool flag = true;
    REP(i, N - 1) {
      if (!ajmt[v[i]][v[i + 1]]) {
        flag = false;
        break;
      }
    }
    if (flag) ans++;
  } while (next_permutation(v.begin() + 1, v.end()));
  cout << ans << endl;
  return 0;
}

Measured memory_bytes: 256
#include <iostream>
using namespace std;

constexpr int MAX_C = 1000;

int main() {
  int N, T;
  cin >> N >> T;
  int smallest{numeric_limits<int>::max()};
  for (int i{}; i < N; ++i) {
    int c, t;
    cin >> c >> t;
    if (t <= T && c < smallest) {
      smallest = c;
    }
  }

  cout << (smallest <= MAX_C ? to_string(smallest) : "TLE") << endl;
  return 0;
}


Measured memory_bytes: 256
/*
ID: rajiv
TASK: test
LANG: C++14
*/
#include<iostream>
#include<algorithm>
#include<cmath>
#include<vector>
#include<map>
#include<set>
#include<unordered_map>
#include<unordered_set>
#include<string>
#include<queue>
#include<stack>
#include<iomanip>
#include<sstream>
#include<iterator>
#include<random>
#include<chrono>

#define fast_io ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define ONLINE_JUDGE

using namespace std;

#define deb(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args); }
void err(istream_iterator<string> it) { cout << '\n';}
template<typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
    cout << '[' << *it << " = " << a << "]  ";
    err(++it, args...);
}
mt19937 rng((unsigned int) chrono::steady_clock::now().time_since_epoch().count());
int rnd(int a, int b){ // including a and b
	return a+(rng()%(b-a+1));
}
#define fcout cout<<fixed<<setprecision(15)
#define repp(i,j,k) for(int i=j; i<k; ++i)
#define rep(i,j) repp(i,0,j)
#define rrep(i,j,k) for(int i=j; i>=k; --i)
#define all(x) (x).begin(), (x).end()
#define sortr(x) sort(x.begin(), x.end())
#define lb(x,val) lower_bound(x.begin(), x.end(), val)
#define ub(x,val) upper_bound(x.begin(), x.end(), val)
#define pb push_back
#define endl '\n'

typedef long long int lli;
typedef pair<int,int> pii;
typedef pair<lli,lli> pll;
typedef vector<int> vi;
typedef vector<lli> vl;
typedef tuple<lli, lli> tii;
typedef tuple<lli, lli, lli> tiii;

//const lli M=998244353ll;
const lli M=1000000007ll;
const double D=1.0;

int dx[]={-1,1,0,0};
int dy[]={0,0,-1,1};

void solve(){
	lli a; long double b;
	cin>>a>>b;
	lli c=round(b*100);
	lli ans=a*c;
	cout<<(ans/100);
	
}

int main(){
	fast_io
	#ifndef ONLINE_JUDGE
	freopen("test.in", "r", stdin);
	freopen("test.out", "w", stdout);
	#endif 
	int tc=1;
	//cin>>tc;
	while(tc--){solve();}
	return 0;
}

Measured memory_bytes: 3808
#include <bits/stdc++.h>
using namespace std;
#define _GLIBCXX_DEBUG
#define rep(i, n) for (int64_t i = 0; i < (int64_t)(n); i++)
using vi = vector<int64_t>;
using vvi = vector<vi>;
using ll = int64_t;
using P = pair<ll,ll>;
ll INF = 1000000007;
// ll INF = 9223372036854775807;
// ll INF = 998244353;

int main() {
    // fasten cin
    cin.tie(0);
    ios::sync_with_stdio(false);
    // implement
    ll n;
    string s;
    cin >> n >> s;
    ll sumw = 0, sumb = 0;
    vi csumw(n), csumb(n);
    rep(i,n){
        if(s.at(i)=='.') sumw++;
        if(s.at(i)=='#') sumb++;
        csumw.at(i) = sumw;
        csumb.at(i) = sumb;
    }
    vi res(n+1);
    res.at(0) = sumw;
    rep(i,n){
        res.at(i+1) = csumb.at(i) + sumw - csumw.at(i);
    }
    sort(res.begin(), res.end());
    cout << res.at(0) << endl;
}

Measured memory_bytes: 8360
import collections
mod = 10 ** 9 + 7
N, M = map(int, input().split())
a = collections.deque([])
for _ in range(M):
    a_m = int(input())
    if len(a) > 0 and a_m == a[-1] + 1:
        print(0)
        exit()
    a.append(a_m)

dp = [1]

if len(a) > 0:
    if 1 != a[0]:
        dp.append(1)
    else:
        dp.append(0)
        a.popleft()
else:
    dp.append(1)

for i in range(2, N + 1):
    if len(a) > 0:
        if i != a[0]:
            tmp = dp[0] + dp[1]
        else:
            tmp = 0
            a.popleft()
    else:
        tmp = dp[0] + dp[1]
    dp[0] = dp[1]
    dp[1] = tmp

print(dp[-1] % mod)


Measured memory_bytes: 5316
N = int(input())
a = list(map(int, input().split()))

rainbow = 0
color = [0 for i in range(8)]

for i in range(N):
    if a[i] <= 399:
        color[0] = 1
    elif a[i] <= 799:
        color[1] = 1
    elif a[i] <= 1199:
        color[2] = 1
    elif a[i] <= 1599:
        color[3] = 1
    elif a[i] <= 1999:
        color[4] = 1
    elif a[i] <= 2399:
        color[5] = 1
    elif a[i] <= 2799:
        color[6] = 1
    elif a[i] <= 3199:
        color[7] = 1
    else:
        rainbow += 1
        
ans = 0
for i in range(len(color)):
    if color[i] == 1:
        ans += 1

if ans == 0:
    print(1, ans+rainbow)
else:
    print(ans, ans+rainbow)

Measured memory_bytes: 3064
#include <bits/stdc++.h>
using namespace std;
#define _GLIBCXX_DEBUG
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define ll long long
#define P pair<ll,ll>
#define all(v) (v).begin(),(v).end()

const ll mod = 1e9+7;
const ll INF = 1e18;
const double pi = acos(-1);


int main(void)
{
    ll r,g,b,n,cnt=0; cin>>r>>g>>b>>n;
    rep(i,n+1)rep(j,n+1){
        ll x=r*i+g*j;
        if(n-x>=0 && (n-x)%b==0) cnt++;
    }
    cout<<cnt<<endl;
    return 0;
}

Measured memory_bytes: 3532
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.IOException;
import java.util.Deque;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.io.BufferedReader;
import java.util.ArrayDeque;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author anand.oza
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        FSugoroku solver = new FSugoroku();
        solver.solve(1, in, out);
        out.close();
    }

    static class FSugoroku {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int n = in.nextInt();
            int m = in.nextInt();
            char[] inputS = in.next().toCharArray(); // len n+1
            boolean[] s = new boolean[n + 1];
            for (int i = 0; i < n; i++) {
                s[i] = inputS[i] == '1';
            }

            Deque<Integer> answer = new ArrayDeque<>();

            int cur = n;
            int last = Integer.MAX_VALUE;
            outer:
            while (cur > 0) {
                for (int i = Math.max(0, cur - m); i < cur && i < last - m; i++) {
                    if (!s[i]) {
                        answer.addFirst(cur - i);
                        last = cur;
                        cur = i;
                        continue outer;
                    }
                }
                out.println(-1);
                return;
            }

            out.println(Util.join(answer));
        }

    }

    static class Util {
        public static String join(Iterable i) {
            StringBuilder sb = new StringBuilder();
            for (Object o : i) {
                sb.append(o);
                sb.append(" ");
            }
            if (sb.length() > 0) {
                sb.deleteCharAt(sb.length() - 1);
            }
            return sb.toString();
        }

    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

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

    }
}



Measured memory_bytes: 31572
s = input()
q = int(input())
Flag = False
right=''
left=''

for i in range(q):
    t = input()
    if t[0] == '1':
        Flag = not Flag
    else:
        _, f, c = t.split()
        if Flag == False and f == '2' or Flag == True and f == '1':
            right += c
        else:
            left += c

ans = left[::-1] + s + right
print(ans if not Flag else ans[::-1])


Measured memory_bytes: 4536
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)
from collections import defaultdict
from bisect import bisect_left


s = input().rstrip("\n")
len_s = len(s)
t = input().rstrip("\n")
len_t = len(t)

alpha = defaultdict(list)
for i in range(len_s):
    alpha[s[i]].append(i)

if not alpha[t[0]]:
    print(-1)
    exit()
else:
    now_index = alpha[t[0]][0]
    answer = now_index + 1

# O(|t|)
for i in range(1,len_t):
    index = alpha[t[i]]
    if not index:
        print(-1)
        exit()
    # O(log(index))
    next_index = bisect_left(index, now_index+1)
    # s[now_index+1:]にt[i]がある場合
    if next_index < len(index):
        answer += index[next_index] - now_index
        now_index = index[next_index]
    else:
        answer += (len_s -1) - now_index + (index[0] + 1)
        now_index = index[0]

print(answer)

Measured memory_bytes: 7924
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(x) x.begin(), x.end()
using namespace std;
typedef long long ll;
typedef pair<int, int> pair;
const int inf = 1000000000; //10^9
const ll inff = 1000000000000000000; //10^18

int main(){
    int d, t, s;
    cin >> d >> t >> s;
    if(t*s >= d) cout << "Yes" << endl;
    else cout << "No" << endl;

    return 0;
}

Measured memory_bytes: 3632
#include <bits/stdc++.h>
using namespace std;
int main(void)
{
  long long int n,a,b,sum=0,number,i,j,jj;
  cin >> n >> a >> b;
  for(i=0;i<=n;i++)
  {
    jj=i;
    number = 0;
    while (jj > 0)
    {
     number += jj % 10;
     jj /= 10;
    }
    if(a <= number && number <= b)
    {
      sum += i;
    }
  }
  cout << sum;
  return 0;
}

Measured memory_bytes: 3620
#include<cstdio>
#include<algorithm>

using namespace std;

typedef long long ll;

int main(){
	int n; ll T;
	scanf("%d %lld", &n, &T);
	ll t[200000];
	for(int i = 0; i < n; i++) scanf("%lld", &t[i]);
	ll res = T;
	for(int i = 1; i < n; i++) res += min(T, t[i] - t[i - 1]);
	printf("%lld\n", res);
	return 0;
}

Measured memory_bytes: 1664
# -*- coding: utf-8 -*-
from itertools import combinations
n = int(input())

primes = []
for i in range(1,n+1):
    z = 2
    while z<=i:
        while i%z==0:
            i //= z
            primes.append(z)
        z += 1

d = {}
for x in primes:
    if x not in d:
        d[x] = 0
    d[x] += 1

keys = list(d.keys())
res = 0

for k in keys:
    if d[k]>=74:
        res += 1
if len(keys)>=2:
    for c in combinations(keys,2):
        if d[c[0]]>=24 and d[c[1]]>=2:
            res += 1
        if d[c[0]]>=2 and d[c[1]]>=24:
            res += 1

        if d[c[0]]>=4 and d[c[1]]>=14:
            res += 1
        if d[c[0]]>=14 and d[c[1]]>=4:
            res += 1
if len(keys)>=3:
    for c in combinations(keys, 3):
        if d[c[0]]>=4 and d[c[1]]>=4 and d[c[2]]>=2:
            res += 1
        if d[c[0]]>=4 and d[c[1]]>=2 and d[c[2]]>=4:
            res += 1
        if d[c[0]]>=2 and d[c[1]]>=4 and d[c[2]]>=4:
            res += 1
print(res)


Measured memory_bytes: 3188
#include <algorithm>
#include <iostream>
#include <vector>

using namespace std;

typedef long long ll;
typedef pair<ll, ll> P;

#define MOD 1000000007
#define REP(i, N) for (int i = 0; i < N; ++i)
#define REP1(i, N) for (int i = 1; i <= N; ++i)
#define RREP(i, N) for (int i = N - 1; i >= 0; --i)
#define ALL(a) a.begin(), a.end()

ll INF = 1e18;

int main() {
  int n, m;
  cin >> n >> m;
  int a[m], b[m];
  ll c[m];
  REP(i, m) {
    cin >> a[i] >> b[i] >> c[i];
    a[i]--, b[i]--;
    c[i] = -c[i];
  }
  ll dist[n];
  REP(i, n) dist[i] = INF;
  dist[0] = 0;
  REP(loop, n - 1) REP(i, m) {
    if (dist[a[i]] == INF) continue;
    if (dist[b[i]] > dist[a[i]] + c[i]) {
      dist[b[i]] = dist[a[i]] + c[i];
    }
  }
  bool negative[n];
  REP(i, n) negative[i] = false;
  REP(loop, n) REP(i, m) {
    if (dist[a[i]] == INF) continue;
    if (dist[b[i]] > dist[a[i]] + c[i]) {
      dist[b[i]] = dist[a[i]] + c[i];
      negative[b[i]] = true;
    }
    if (negative[a[i]]) {
      negative[b[i]] = true;
    }
  }
  if (negative[n - 1]) {
    puts("inf");
  } else {
    cout << -dist[n - 1] << endl;
  }
  return 0;
}

Measured memory_bytes: 256
n,m=map(int,input().split())

p=[i for i in range(n)]
r=[0 for i in range(n)]

def find(x):
  if p[x]==x:
    return x
  else:
    p[x]=find(p[x])
    return p[x]

def unite(x,y):

  x = find(x)
  y = find(y)
  if x==y:
    return

  if r[x]<r[y]:
    p[x]=y
  else:
    p[y]=x
    if r[x]==r[y]:
      r[x] += 1

def same(x, y):
  return find(x)==find(y)

for i in range(m):
  x,y,z=map(int,input().split())
  unite(x-1,y-1)

s = set()
for i in range(n):
  s.add(find(i))

print(len(s))


Measured memory_bytes: 16784
#include<bits/stdc++.h>
using namespace std;
#define int long long

struct node{
  int key;
  node *parent,*left,*right;
};
node *root,*nil;

void insert(int k){
  node *p;
  p = (node *)malloc(sizeof(node));
  p->key = k;
  p->left = nil;
  p->right = nil;

  node *v = root,*u = nil;
  //if(v == nil) return;
  while(v != nil){
    u = v;
    if(p->key < v->key) v = v->left;
    else v = v->right;
  }
  p->parent = u;
  if(u == nil) root = p;
  else {
    if(p->key < u->key) u->left = p;
    else u->right = p;
  }
}

node* successor(node *u){
  if(u->right != nil){
    u = u->right;
    while(u->left != nil) u = u->left;
    return u;
  }
  node *v = u->parent;
  while(v != nil && u == v->right){
    u = v;
    v = v->parent;
  }
  return v;
}

void nodedelete(int k){
  node *p;
  p = root;
  while(p != nil){
    if(p->key == k) break;
    if(p->key < k) p = p->right;
    else p = p->left;
  }
  node *u; //削除する接点
  node *v; //uの子
  if(p->left == nil || p->right == nil) u = p;
  else u = successor(p);
  
  if(u->left != nil) v = u->left;
  else v = u->right;

  if(v != nil) v->parent = u->parent;

  if(u->parent == nil) root = v;
  else {
    if(u == u->parent->left) u->parent->left = v;
    else u->parent->right = v;
  }

  if(u != p) p->key = u->key;
}

bool find(int k){
  node *p;
  p = root;
  while(p != nil){
    if(p->key == k) return 1;
    if(p->key < k) p = p->right;
    else p = p->left;
  }
  return 0;
}

void preorder(node *u){
  if(u == nil) return;
  cout << " " << u->key;
  preorder(u->left);
  preorder(u->right);
}

void inorder(node *u){
  if(u == nil) return;
  inorder(u->left);
  cout << " " << u->key;
  inorder(u->right);
}

signed main(){
  cin.tie(0);
  ios::sync_with_stdio(false);

  int m; cin >> m;
  for(int i = 0; i < m; i++){
    string s; cin >> s;
    if(s[0] == 'p'){
      inorder(root);
      cout << '\n';
      preorder(root);
      cout << '\n';
      continue;
    }
    else {
      int k; cin >> k;
      if(s[0] == 'f'){
        if(find(k)) cout << "yes" << endl;
        else cout << "no" << endl;
      }
      else if(s[0] == 'd'){
        nodedelete(k);
      }
      else insert(k);
    }
  }

  return 0;
}



Measured memory_bytes: 21860
use std::io;
use std::io::prelude::*;

fn main() {
    let scan = io::stdin();
    for line in scan.lock().lines() {
        let mut sum: u32 = 0;
        let uline = line.unwrap();
        if uline == "0" {
            break;
        } else {
            for e in uline.chars() {
                sum += (e as u8 - 48) as u32;
            }
        }
        println!("{}", sum);
    }
}



Measured memory_bytes: 5028
*a, n = gets.chomp.split(" ").map(&:to_i)
a = a.sort.reverse
cnt = 0

max_0 = n / a[0]
0.upto(max_0) do |r|
  rest1 = n - r * a[0]
  max_1 = rest1 / a[1]
  0.upto(max_1) do |g|
    rest2 = rest1 - g * a[1]
    cnt += 1 if rest2 % a[2] == 0
  end
end

puts cnt


Measured memory_bytes: 1788
#define _GLIBCXX_DEBUG
#include<bits/stdc++.h>
#include<algorithm>//next_permutation
#define rep(i,n) for (int i = 0;i < (n);i++)
#define all(v) v.begin(),v.end()
#define dec(n) cout << fixed << setprecision(n);
#define large "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
#define small "abcdefghijklmnopqrstuvwxyz"
using namespace std;
using ll = long long;
using P = pair<ll,ll>;
using vl = vector<ll>;
using vvl = vector<vl>;

ll gcd(ll a,ll b){
  if(b == 0) return a;
  return gcd(b , a % b);
}

const ll MOD = 998244353;
const ll MAX = 2000001;

ll mod(ll a){
  if(a % MOD < 0) return MOD + (a % MOD);
  return a % MOD;
}

ll lcm(ll a,ll b){
  return (a*b)/gcd(a,b);
}


int main(){
  ll n; cin >> n;
  
  set<ll> mochi;
  
  rep(i,n){
    ll x; cin >> x;
    mochi.insert(x);
  }
  
  cout << mochi.size() << endl;
  
  
}

Measured memory_bytes: 3568
//
//  main.cpp
//  AC
//
//  Created by makinofuya on 2019/07/08.
//  Copyright © 2019 makinofuya. All rights reserved.
//
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <stack>
typedef long long ll;
using namespace std;
#define mod 1000000007
#define rep(i,n) for(int i=0;i<n;i++)
#define out(s) cout << s << endl

int main(){
    int n,k;cin >> n >> k;
    int mi=0;
    int c=1;
    int a,b;
    rep(i,n){
        a=c*2;
        b=c+k;
        mi=min(a,b);
        c=mi;
    }
    cout << mi << endl;
    return 0;
}



Measured memory_bytes: 256
#include <bits/stdc++.h>
#define FOR(i, a, n) for(ll i = (ll)a; i < (ll)n; i++)
#define FORR(i, n) for(ll i = (ll)n - 1LL; i >= 0LL; i--)
#define rep(i, n) FOR(i, 0, n)
#define ALL(x) begin(x), end(x)
using namespace std;
using ll = long long;
constexpr ll Mod = 998244353;
constexpr ll mod = 1e9 + 7;
constexpr ll inf = 1LL << 60;
const double PI = acos(-1);
template <typename T1, typename T2> inline bool chmax(T1 &a, T2 b) {
    return a < b && (a = b, true);
}
template <typename T1, typename T2> inline bool chmin(T1 &a, T2 b) {
    return a > b && (a = b, true);
}
/*-------------------------------------------*/

int main() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);

    int a, b, c;
    int k;
    cin >> a >> b >> c >> k;

    while(a >= b) {
        k--;
        b <<= 1;
    }

    while(b >= c) {
        k--;
        c <<= 1;
    }

    cout << (k < 0 ? "No" : "Yes") << endl;

    return 0;
}

Measured memory_bytes: 3648
/**Hey, What's up?*/

#include<bits/stdc++.h>
using namespace std;
#define pi acos(-1.0)
#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
vector<long long>v;
multiset<long long>st1,st2;
int main()
{
    fastio;
    long long a=0,b=0,c,d,e,f=0,l,g,m,n,k,i,j,t,p,q,x,y;
    cin>>x>>y>>a>>b>>c;
    for(i=0;i<a;i++){
        cin>>p;
        v.push_back(p);
    }
    sort(v.begin(),v.end());
    f=0;
    for(i=a-1,j=x;j>0;j--,i--){
        st1.insert(v[i]);
        f+=v[i];
    }
    v.clear();
    for(i=0;i<b;i++){
        cin>>p;
        v.push_back(p);
    }
    sort(v.begin(),v.end());
    for(i=b-1,j=y;j>0;j--,i--){
        st2.insert(v[i]);
        f+=v[i];
    }
    v.clear();

    for(i=0;i<c;i++){
        cin>>p;
        v.push_back(p);
    }
    sort(v.begin(),v.end());

    for(i=c-1;i>=0;i--){
        if(*st1.begin()>*st2.begin()){
            d=*st2.begin();
            if(d>=v[i])break;
            st2.erase(st2.begin());
            st2.insert(v[i]);
            f-=d;
            f+=v[i];
        }
        else{
            d=*st1.begin();
            if(d>=v[i])break;
            st1.erase(st1.begin());
            st1.insert(v[i]);
            f-=d;
            f+=v[i];
        }
    }
    cout<<f<<'\n';
    return 0;
}


Measured memory_bytes: 9460
#include<iostream>
using namespace std;

struct Card {
    char suit, value;
};

void bubble(struct Card A[], int N) {
    for (int i = 0; i < N; i++) {
        for(int j = N-1; j >= i+1; j--) {
            if(A[j].value < A[j -1].value) {
                Card t = A[j];
                A[j] = A[j -1];
                A[j-1] = t;
            }
        }
    }
}

void selection(struct Card A[], int N) {
    for(int i = 0; i < N; i++) {
        int minj = i;
        for (int j = i; j < N; j++) {
            if (A[j].value < A[minj].value) minj = j;
        }
        Card t = A[i];
        A[i] = A[minj];
        A[minj] = t;
    }
}

void print(struct Card A[], int N) {
    for (int i = 0; i < N; i++) {
        if (i > 0) cout << " ";
        cout << A[i].suit << A[i].value;
    }
    cout << endl;
}

bool isStable(struct Card C1[], struct Card C2[], int N) {
    for(int i = 0; i < N; i++) {
        if(C1[i].suit != C2[i].suit) return false;
    }
    return true;
}

int main() {
    Card C1[100], C2[100];
    int N;
    
    cin >> N;
    for (int i = 0; i < N; i++) {
        cin >> C1[i].suit >> C1[i].value;
    }
    
    for(int i = 0; i < N; i++) C2[i] = C1[i];
    
    bubble(C1, N);
    selection(C2, N);
    
    print(C1, N);
    cout << "Stable" << endl;
    print(C2, N);
    if ( isStable(C1, C2, N)) {
        cout << "Stable" << endl;
    }
    else {
        cout << "Not stable" << endl;
    }
    
    return 0;
}


Measured memory_bytes: 3124
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.Text;
using System.Globalization;
using System.Diagnostics;



class Myon
{
    public Myon() { }
    public static int Main()
    {
        new Myon().calc();
        return 0;
    }
    

    Scanner cin;

    void calc()
    {
        cin = new Scanner();
        int A, B, C, D, E, F;
        A = cin.nextInt();
        B = cin.nextInt();
        C = cin.nextInt();
        D = cin.nextInt();
        E = cin.nextInt();
        F = cin.nextInt();
        
        int[] dp = new int[F + 1];
        for (int i = 0; i < F + 1; i++)
        {
            if (dp[i] != i) continue;
            if (dp[i] + C <= F) dp[i + C] = i + C;
            if (dp[i] + D <= F) dp[i + D] = i + D;
        }

        for (int i = 1; i < F + 1; i++)
        {
            dp[i] = Math.Max(dp[i], dp[i - 1]);
        }

        long AnsAll = A * 100;
        long AnsSalt = 0;

        for (int i = 0; i < 31; i++)
        {
            for (int j = 0; j < 31; j++)
            {
                int Water = A * 100 * i + B * 100 * j;
                if (Water > F) continue;
                int MaxSalt = Math.Min(F - Water, Water / 100 * E);
                int Salt = dp[MaxSalt];
                int Sum = Water + Salt;
                if(AnsSalt * Sum < Salt * AnsAll)
                {
                    AnsAll = Sum;
                    AnsSalt = Salt;
                }
            }
        }
        Console.WriteLine(AnsAll + " " + AnsSalt);
    }
}



class Scanner
{
    string[] s;
    int i;

    char[] cs = new char[] { ' ' };

    public Scanner()
    {
        s = new string[0];
        i = 0;
    }

    public string next()
    {
        if (i < s.Length) return s[i++];
        string st = Console.ReadLine();
        while (st == "") st = Console.ReadLine();
        s = st.Split(cs, StringSplitOptions.RemoveEmptyEntries);
        if (s.Length == 0) return next();
        i = 0;
        return s[i++];
    }

    public int nextInt()
    {
        return int.Parse(next());
    }
    public int[] ArrayInt(int N, int add = 0)
    {
        int[] Array = new int[N];
        for (int i = 0; i < N; i++)
        {
            Array[i] = nextInt() + add;
        }
        return Array;
    }

    public long nextLong()
    {
        return long.Parse(next());
    }

    public long[] ArrayLong(int N, long add = 0)
    {
        long[] Array = new long[N];
        for (int i = 0; i < N; i++)
        {
            Array[i] = nextLong() + add;
        }
        return Array;
    }

    public double nextDouble()
    {
        return double.Parse(next());
    }


    public double[] ArrayDouble(int N, double add = 0)
    {
        double[] Array = new double[N];
        for (int i = 0; i < N; i++)
        {
            Array[i] = nextDouble() + add;
        }
        return Array;
    }
}

Measured memory_bytes: 13268
#include<iostream>
#include<vector>
#include<string>

using namespace std;

int main(){
    int N;
    int changedChar;
    int Ndash;
    string S;
    cin >> N;
    cin >> S;

    for(int i=0;i<S.length();i++){
        if((int)S[i] + N > 90){
            Ndash = N - (91 - (int)S[i]);
            changedChar = (int)'A' + Ndash;
            S[i] = (char)changedChar;

        }
        else{
            changedChar = (int)S[i] + N;
            S[i] = (char)changedChar;
        }
    }

    cout << S;
}

Measured memory_bytes: 256
/**
 *    author:  otera    
**/
#include<iostream>
#include<string>
#include<cstdio>
#include<cstring>
#include<vector>
#include<cmath>
#include<algorithm>
#include<functional>
#include<iomanip>
#include<queue>
#include<deque>
#include<ciso646>
#include<random>
#include<map>
#include<set>
#include<complex>
#include<bitset>
#include<stack>
#include<unordered_map>
#include<utility>
#include<cassert>
using namespace std;

//#define int long long
typedef long long ll;
typedef unsigned long long ul;
typedef unsigned int ui;
typedef long double ld;
const int inf=1e9+7;
const ll INF=1LL<<60 ;
const ll mod=1e9+7 ;
#define rep(i,n) for(int i=0;i<n;i++)
#define per(i,n) for(int i=n-1;i>=0;i--)
#define Rep(i,sta,n) for(int i=sta;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define per1(i,n) for(int i=n;i>=1;i--)
#define Rep1(i,sta,n) for(int i=sta;i<=n;i++)
typedef complex<ld> Point;
const ld eps = 1e-8;
const ld pi = acos(-1.0);
typedef pair<int, int> P;
typedef pair<ld, ld> LDP;
typedef pair<ll, ll> LP;
#define fr first
#define sc second
#define all(c) c.begin(),c.end()
#define pb push_back
#define debug(x)  cerr << #x << " = " << (x) << endl;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }

void solve() {
	int a, b, c; cin >> a >> b >> c;
    int cnt = 0;
    while(true) {
        if(a % 2 == 1 || b % 2 == 1 || c % 2 == 1) {
            cout << cnt << endl;
            return;
        }
        if(cnt > 200000) {
            cout << -1 << endl;
            return;
        }
        int a_ = (b + c) / 2, b_ = (a + c) / 2, c_ = (a + b) / 2;
        a = a_;
        b = b_;
        c = c_;
        cnt ++;
    }
}

signed main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	//cout << fixed << setprecision(10);
	//int t; cin >> t; rep(i, t)solve();
	solve();
    return 0;
}

Measured memory_bytes: 256
#include <iostream>
#include <cmath>
#include <string>
#include <algorithm>
#include <set>
#include <vector>
#include <map>
#include <list>
#include <stack>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <queue>
#define REP(i, n) for(i=0; i<n; i++)
#define REPR(i, n) for(i=n; i>=0; i--)
#define FOR(i, m, n) for(i=m; i<n; i++)
#define max(a, b) ((a)>(b) ? (a):(b))
#define min(a, b) ((a)<(b) ? (a):(b))
#define INF 1000000000
#define MOD 1000000007LL
#define MAX 100005
#define NIL -1
#define WHITE 0
#define GRAY 1
#define BLACK 2
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
typedef pair<double, double> doup;
ll N, M, R;
ll i, j, k;
ll a, b, c;
ll d[201][201];
vector<ll> r;
ll sum;

int main(void) {
    ll N, i, ans=0;
    cin >> N;
    ll p[100000];
    stack<ll> stk;
    for(i=1; i<=N; i++) {
        cin >> p[i];
    }
    for(i=N; i>0; i--) {
        if(p[i]==i)
            stk.push(i);
    }
    
    ll t;
    while(stk.size()) {
        t=stk.top(); stk.pop();
        if(stk.empty()) {
            ans++;
        }else if(t+1==stk.top()) {
            ans++; stk.pop();
        }else {
            ans++;
        }
        
    }
    
    cout << ans << endl;
}


Measured memory_bytes: 1792
#include <bits/stdc++.h>
using namespace std;

int main() {
  int H, W;
  cin >> H >> W;

  vector<vector<char>> squares(H, vector<char>(W));
  for (int i = 0; i < H; i++) {
    string input;
    cin >> input;
    for (int j = 0; j < W; j++) {
      squares.at(i).at(j) = input.at(j);
    }
  }

  for (int i = 0; i < H; i++) {
    int flag = 0;
    for (int j = 0; j < W; j++) {
      if (squares.at(i).at(j) == '#') {
        flag = 1;
        break;
      }
    }
    if (flag == 0) {
      for (int j = 0; j < W; j++) {
        squares.at(i).at(j) = '*';
      }
    }
  }

  for (int i = 0; i < W; i++) {
    int flag = 0;
    for (int j = 0; j < H; j++) {
      if (squares.at(j).at(i) == '#') {
        flag = 1;
        break;
      }
    }
    if (flag == 0) {
      for (int j = 0; j < H; j++) {
        squares.at(j).at(i) = '*';
      }
    }
  }

  for (int i = 0; i < H; i++) {
    int flag = 0;
    for (int j = 0; j < W; j++) {
      if (squares.at(i).at(j) == '*') {
        continue;
      }
      flag = 1;
      cout << squares.at(i).at(j);
    }
    if (flag == 0) {
      continue;
    }
    cout << endl;
  }
}


Measured memory_bytes: 256
#include <iostream>
#include <cmath>
#include <iomanip>

using namespace std;

int gcd(int x, int y) {
    if(y == 0) return x;
    return gcd(y, x%y);
}

// x, y, gcd
int lcm(int x, int y, int g) {
    return x/g*y;
}

int main(){
    int a, b, g, l;

    while (cin >> a >> b) {
        g = a > b ? gcd(a, b) : gcd(b, a);
        l = a > b ? lcm(a,b,g) : lcm(b,a,g);

        cout << g << " " << l << endl;
    }

    return 0;
}


Measured memory_bytes: 3004
#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<queue>
#include<map>
#include<math.h>
#include<iomanip>
#include<set>
#include <numeric>
#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define FORR(i, m, n) for(int i = m;i >= n;i--)
#define SORT(v, n) sort(v, v+n);
#define VSORT(v) sort(v.begin(), v.end());
#define REVERSE(v,n) reverse(v,v+n);
#define VREVERSE(v) reverse(v.begin(), v.end());
#define ll long long
#define pb(a) push_back(a)
#define INF 9999999

using namespace std;


int dy[4] = { 0,0,1,-1 };
int dx[4] = { 1,-1,0,0 };
int dxx[8] = { 0,0,1,1,1,-1,-1,-1 };
int dyy[8] = { 1,-1,0,1,-1,0,1,-1 };


ll m = 1000000007;

ll gcd(ll x, ll y) {
	ll m = max(x, y), n = min(x, y);
	if (m%n == 0)return n;
	else return gcd(m%n, n);
}
ll lcm(ll x, ll y) {
	return x / gcd(x, y)*y;
}

ll myPow(ll x, ll n, ll m) {
	if (n == 0)
		return 1;
	if (n % 2 == 0)
		return myPow(x * x % m, n / 2, m);
	else
		return x * myPow(x, n - 1, m) % m;
}



ll T[101];
int main() {
	int N;
	cin >> N;
	ll ans = 1;
	REP(i, N) {
		ll t;
		cin >> t;
		ll a = max(ans, t), b = min(ans, t);
		if (a%b == 0) {
			ans = a;
			continue;
		}
		else ans = lcm(ans, t);
	}
	cout << ans << endl;
}

Measured memory_bytes: 256
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <iostream>
#include <istream>
#include <iterator>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#include <tuple>
#include <iomanip>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll, ll> P;
typedef vector<ll> vec;
typedef vector<vec> mat;
#define rep(i, n) for(ll i = 0; i < (n); i++)
#define revrep(i, n) for(ll i = (n)-1; i >= 0; i--)
#define pb push_back
#define f first
#define s second
/*
ll max(ll a, ll b){return (a > b) ? a : b;}
ll min(ll a, ll b){return (a < b) ? a : b;}
ll max3(ll a, ll b, ll c){return max(a, max(b, c));};
ll min3(ll a, ll b, ll c){return min(a, min(b, c));};
ll max4(ll a, ll b, ll c, ll d){return max(max(a, b), min(c, d));};
ll min4(ll a, ll b, ll c, ll d){return min(min(a, b), min(c, d));};
ll max5(ll a, ll b, ll c, ll d, ll e){return max(max(a, b), max3(c, d, e));};
ll min5(ll a, ll b, ll c, ll d, ll e){return min(min(a, b), min3(c, d, e));};
*/
const ll INFL = 1LL << 60;//10^18 = 2^60
const int INF = 1 << 30;//10^9
ll MOD = 1000000007;
//ll MOD = 998244353;

vector<ll> dy = {0, 0, 1, -1, 1, 1, -1, -1, 0};
vector<ll> dx = {1, -1, 0, 0, 1, -1, 1, -1, 0};

//デバッグ
void BinarySay(ll x, ll y = 60){rep(i, y) cout << (x>>(y-1-i) & 1); cout << endl;}

ll pow_long(ll x, ll k){
  ll res = 1;
  while(k > 0){
    if(k % 2) res *= x;
    x *= x;
    k /= 2;
  }
  return res;
}
ll pow_mod(ll x, ll k){
  ll res = 1;
  while(k > 0){
    if(k % 2){
      res *= x; res %= MOD;
    }
    x *= x; x %= MOD;
    k /= 2;
  }
  return res;
}

ll inverse(ll x){return pow_mod(x, MOD - 2);};

ll gcd(ll a, ll b){
    if(b == 0) return a;
    return gcd(b, a % b);
}

ll lcm(ll x, ll y){return x / gcd(x, y) * y;};


ll kai_mod(ll x){
  if(x == 0) return 1;
  return x * kai_mod(x-1) % MOD;
}


//コンビネーション
const int MAXcomb = 200010;
ll fac[MAXcomb], finv[MAXcomb], inv[MAXcomb];
//facはn!,finvは1/n!
//invは逆元
void COMinit(){
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    for(int i = 2; i < MAXcomb; i++){
        fac[i] = fac[i-1] * i % MOD;
        inv[i] = MOD - inv[MOD%i] * (MOD/i) % MOD;
        finv[i] = finv[i-1] * inv[i] % MOD;
    }
}
ll comb(int n, int k){
    if(n < k) return 0;
    if(n < 0 || k < 0) return 0;
    return fac[n] * finv[k] % MOD * finv[n-k] % MOD;
}

ll dp[3010][3010];

int main(){
  ll N;
  string S;
  cin >> N >> S;
  rep(i, N) dp[0][i] = 1;
  for(ll i = 1; i < N; i++){
    vector<ll> sum(N, 0);
    sum[0] = dp[i-1][0];
    for(ll j = 1; j < N; j++){
      sum[j] = sum[j-1] + dp[i-1][j];
      sum[j] %= MOD;
    }
    if(S[i-1] == '<'){
      rep(j, N){
        dp[i][j] += sum[j];
      }
    }else{
      rep(j, N){
        dp[i][j] += sum[N-i] - sum[j] + MOD;
        dp[i][j] %= MOD;
      }
    }
  }
  cout << dp[N-1][0] << endl;
}


Measured memory_bytes: 71936
#include<bits/stdc++.h>
//#include <ext/pb_ds/tree_policy.hpp>
//#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
//using namespace __gnu_pbds;
typedef int ll;
typedef unsigned long long ull;
typedef pair<ll,ll> pll;
typedef pair<int,int> pii;
//typedef tree<ll,null_type,less<ll>,rb_tree_tag,tree_order_statistics_node_update>ordered_set;
#define fread           freopen("input.txt","r",stdin)
#define fwrite          freopen("output.txt","w",stdout)
#define eb              emplace_back
#define em              emplace
#define pb              push_back
#define Mp              make_pair
#define ff              first
#define ss              second
#define all(a)          a.begin(),a.end()
#define Unique(a)       sort(all(a)),a.erase(unique(all(a)),a.end())
#define FastRead        ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define memo(ara,val)   memset(ara,val,sizeof(ara))
#define II              ( { int a ; read(a) ; a; } )
#define LL              ( { ll a ; read(a) ; a; } )
#define DD              ({double a; scanf("%lf", &a); a;})
#define rep(i,n)        for(int i=0;i<n;i++)
#define rep1(i,n)       for(int i=1;i<=n;i++)
#define rrep(i,a,n)     for(int i=a;i<=n;i++)
#define per(i,n,a)      for(int i=n;i>=a;i--)
#define pf(n)           printf("%lld",n)
#define pfi(n)          printf("%d",n)
#define sp              printf(" ")
#define ln              printf("\n")
// bool operator< (const node& sx) const { return sx.val < val; }
//set<ll,greater<ll> >st;
//priority_queue<ll , vector<ll> , greater<ll> >
template<class T>inline bool read(T &x){ int c=getchar();int sgn=1;
  while(~c&&c<'0'|c>'9'){if(c=='-')sgn=-1;c=getchar();}
  for(x=0; ~c&&'0'<=c&&c<='9'; c=getchar())x=x*10+c-'0';x*=sgn;return ~c;
}
const ll MOD = 1e9+7;
template <typename T> inline T BigMod(T A,T B,T M = MOD){A %= M;T ret = 1;while(B)
{if(B & 1) ret = (ret * A) % M;A = (A * A) % M;B = B >> 1;}return ret;}
const ll N = 100005;
ll dp[N];
ll n, m;
ll par[N];
vector<ll>v[N];
ll solve(ll x){
   if(v[x].size()==0) return 0;
   if(dp[x]!=-1) return dp[x];
   ll s = 0;
   for(ll y : v[x]){
       if(y!=par[x]){
          par[y] = x;
          s = max(s, solve(y) + 1);
       }
   }
   return dp[x] = s;
}
int main(){
    memset(dp, -1, sizeof(dp));
    cin >> n >> m ;
    ll mx = 0;
    while(m--){
        ll x, y;
        cin >> x >> y;
        v[x].eb(y);
    }
    rep1(i, n){
        mx = max(mx, solve(i));
    }
    cout << mx << '\n';
}

















Measured memory_bytes: 8576
x,y=map(str,input().split())
a=['A', 'B', 'C', 'D', 'E', 'F']

X=0
Y=0
for i in range(6):
    if a[i]==x:
        X=i
    if a[i]==y:
        Y=i

if X>Y:
    print(">")
elif X==Y:
    print("=")
else:
    print("<")

Measured memory_bytes: 3064