akhauriyash/Code-Regression huggingface dataset:
#include <iostream>
#include <algorithm>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <numeric>
#include <bitset>
#include <cmath>

static const int MOD = 1000000007;
using ll = long long;
using u32 = unsigned;
using u64 = unsigned long long;
using namespace std;

template<class T> constexpr T INF = ::numeric_limits<T>::max()/32*15+208;

int main() {
    int d, l;
    cin >> d >>l;
    cout << d/l+(d%l) << "\n";
    return 0;
}


Measured memory_bytes: 3096
#include <bits/stdc++.h>
using namespace std;
# define rep(i,n) for(int i=0;i<(n);i++)
typedef long long ll;

int main(){
	cin.tie(0);
   	ios::sync_with_stdio(false);
    
    ll N;
    cin>>N;
    vector<ll> A(N);
    unordered_map<ll,ll> mp1;
    unordered_map<ll,ll> mp2;
    rep(i,N){
        cin>>A[i];
        ++mp1[(i+1)-A[i]];
        ++mp2[(i+1)+A[i]];
    }
    ll ans = 0;
    ll n1,n2;
    ll a;
    for(auto itr = mp1.begin(); itr != mp1.end();++itr){
        a = itr->first;
        n1 = itr->second;
        auto itr2 = mp2.find(a);
        if(itr2 != mp2.end()){
            ans += n1*itr2->second;
        }
        
    }

    cout<<ans<<"\n";

	
	return 0;
}

Measured memory_bytes: 20228
# -*- coding: utf-8 -*-
"""
Created on Sun Sep 20 23:06:24 2020

@author: liang
"""
num = [int(x) for x in input().split()]
M = max(num)
S = sum(num)
if M*3%2 == S%2:
    print((3*M-S)//2)
else:
    print((3*(M+1)-S)//2)

Measured memory_bytes: 9120
#include<iostream>
#include<vector>
using namespace std;
using ll = long long;

int main() {
    // get N <= 999
    int n;
    cin >> n;
    
    int decider = n % 10;
    
    if (decider == 3) cout << "bon" << endl;
    else if ((decider == 0) or (decider == 1) or (decider == 6) or (decider == 8)) cout << "pon" << endl;
    else cout << "hon" << endl;

    return 0;
}

Measured memory_bytes: 3636
#include <stdio.h>

long double x1, y1, x2, y2, x3, y3, x4, y4;

int main()
{
	while (~scanf("%Lf %Lf %Lf %Lf %Lf %Lf %Lf %Lf", &x1, &y1, &x2, &y2, &x3, &y3, &x4, &y4))
	{
		if (!(x2 < x3 || x4 < x1 || y2 < y3 || y4 < y1))
		{
			printf("YES\n");
		}
		else
		{
			printf("NO\n");
		}
	}

	return 0;
}

Measured memory_bytes: 2608
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstring>
using namespace std;
bool f1,f2;
char s[200];
int main()
{
	cin>>s;
	int len=strlen(s);
	for(int i=0;i<len;i++)
	{
		if(s[i]=='C')
			f1=1;
		if(f1&&s[i]=='F')
			f2=1;
		if(f1&&f2)	break;
	}
	if(f1&&f2)	cout<<"Yes";
	else cout<<"No";
	
	return 0;
}


Measured memory_bytes: 256
d = {1:2,2:5,3:5,4:4,5:5,6:6,7:3,8:7,9:6}
N,M = map(int,input().split())
A = list(map(int,input().split()))
A.sort()
d_ = {}
for i in range(M):
    d_[d[A[i]]] = A[i]
diff = [(d_[key],key) for key in d_]
diff.sort()

DP = ['']*(10**4+1)
for a,l in diff:
    DP[l] = str(a)
    
for i in range(N+1):
    for a,l in diff:
        if i-l >= 0:
            if len(DP[i-l])+1>=len(DP[i]) and DP[i-l]!='':
                    DP[i] = str(a)+DP[i-l]

ans = list(DP[N])
ans.sort()
ans.reverse()
ans = ''.join(ans)
print(ans)

Measured memory_bytes: 28916
// ABC067_A.cpp : Defines the entry point for the console application.
//

#include <iostream>
#include <algorithm>
#include <string>

using namespace std;

int main()
{
	char c;
	cin >> c;
	if (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u') {
		cout << "vowel" << endl;
		return 0;
	}
	cout << "consonant" << endl;
	return 0;
}



Measured memory_bytes: 256
#include <cstdio>
#include <iostream>
#include <cassert>
#include <string>
#include <algorithm>
#include <cstring>
#include <utility>
#include <vector>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <cmath>
#include <deque>
#include <unordered_map>
#define IOS ios_base::sync_with_stdio(0); cin.tie(0)

using namespace std;
typedef long long LL;
typedef pair<int, int> pii;
typedef pair<LL, LL> pll;
const int MAXN = 234567;
vector<int> G[MAXN];

int main() {
    int N;
    scanf("%d", &N);
    for (int i = 0; i < N - 1; i++) {
        int u, v;
        scanf("%d %d", &u, &v);
        if (v < u) swap(u, v);
        G[u].push_back(v);
    }
    LL ans = 0;
    for (int i = 1; i <= N; i++) {
        LL len = (N - i + 1);
        ans += len * (len + 1) / 2;
    }
    for (int i = 1; i <= N; i++) {
        for (int j : G[i]) {
            ans -= (LL)i * (N - j + 1);
        }
    }
    printf("%lld\n", ans);
    return 0;
}
/* stuff you should look for
	* int overflow, array bounds
	* special cases (n=1?)
	* do smth instead of nothing and stay organized
	* WRITE STUFF DOWN
by Benq;
*/


Measured memory_bytes: 15380
#include<bits/stdc++.h>
using namespace std;
string to_string(const string& s) {
	return '"' + s + '"';
}
string to_string(const bool b) {
	return (b ? "true" : "false");
}
string to_string(const char* s) {
	return to_string((string)s);
}
string to_string(const char c) {
	string s = "'";
	s += c;
	s += "'";
	return s;
}
template<class T, class U>
string to_string(const pair<T, U>& p) {
	string s = "(";
	s += to_string(p.first);
	s += ", ";
	s += to_string(p.second);
	s += ")";
	return s;
}
template<class T>
string to_string(const T& a) {
	bool first = true;
	string s = "{";
	for (const auto& x : a) {
		if(!first){
			s += ", ";
		}
		first = false;
		s += to_string(x);
	}
	s += "}";
	return s;
}
void debug_out() {cerr << '\n';}
template<class Head, class... Tail>
void debug_out(Head head, Tail... tail) {
	cerr << ' ' << to_string(head);
	debug_out(tail...);
}
#ifdef LOCAL
#define debug(...) cerr << "[" << #__VA_ARGS__ << "] = ", debug_out(__VA_ARGS__)
#else
#define debug(...)
#endif
using ll = long long;
using ld = long double;
const int mod = 1e9 + 7;
const int inf = 2e9;
const ll inf64 = 7e18l;
void min_self(int& x, int y) {
	x = min(x, y);
}
vector<vector<int>> graph;
vector<int> visited, color;
vector<int> cnt(2);
void dfs(int v) {
	++cnt[color[v]];
	visited[v] = true;
	for (int u : graph[v]) {
		if (visited[u]) {
			if (color[u] == color[v]) {
				cout << -1 << '\n';
				exit(0);
			}
			continue;
		}
		color[u] = color[v] ^ 1;
		dfs(u);
	}
}
int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout << fixed << setprecision(20);
	int n, m;
	cin >> n >> m;
	graph.resize(n);
	visited.resize(n);
	color.resize(n, -1);
	vector<vector<int>> edge(n, vector<int>(n));
	for (int i = 0; i < m; ++i) {
		int u, v;
		cin >> u >> v;
		--u;
		--v;
		edge[u][v] = edge[v][u] = 1;	
	}
	for (int i = 0; i < n; ++i) {
		for (int j = i + 1; j < n; ++j) {
			if (edge[i][j]) {
				continue;
			}
			graph[i].push_back(j);
			graph[j].push_back(i);
		}
	}
	vector<pair<int, int>> comp;
	for (int i = 0; i < n; ++i) {
		if (visited[i]) {
			continue;
		}
		cnt[0] = cnt[1] = 0;
		color[i] = 0;
		dfs(i);
		comp.emplace_back(cnt[0], cnt[1]);
	}
	int k = comp.size();
	vector<vector<int>> dp(k + 1, vector<int> (2 * n + 1, false));
	dp[0][0 + n] = true;
	for (int i = 1; i <= k; ++i) {
		pair<int, int> p = comp[i - 1];
		for (int val = 0; val <= 2 * n; ++val) {
			if (!dp[i - 1][val]) {
				continue;
			}
			dp[i][val + p.first - p.second] = true;
			dp[i][val - p.first + p.second] = true;
		}
	}
	int answer = inf;
	for (int val = 0; val <= 2 * n; ++val) {
		if (!dp[k][val]) {
			continue;
		}
		int real_dif = val - n;
		int a = (n + real_dif) / 2;
		int b = n - a;
		min_self(answer, a * (a - 1) / 2 + b * (b - 1) / 2);
	}
	cout << answer << '\n';
 	return 0;
}


Measured memory_bytes: 6144
#include "bits/stdc++.h"

using namespace std;

typedef long double ld;
const ld eps = 1e-9;
const int INF = numeric_limits<int>::max()/2;

struct Event{
    int s1,s2;
    ld time;
    Event(int s1,int s2,ld time): s1(s1),s2(s2),time(time){}
};

bool operator < (const Event &e, const Event &f){
    return e.time < f.time;
}

struct Star{
    ld x,y,z,vx,vy,vz,r,vr;
    Star(ld x, ld y, ld z, ld vx, ld vy, ld vz,ld r,ld vr):x(x),y(y),z(z),vx(vx),vy(vy),vz(vz),r(r),vr(vr){}
};

ld check(const Star &s1,const Star &s2){
    ld x=s1.x-s2.x, y=s1.y-s2.y, z=s1.z-s2.z, r=s1.r+s2.r;
    ld vx=s1.vx-s2.vx, vy=s1.vy-s2.vy, vz=s1.vz-s2.vz,vr=s1.vr+s2.vr;
    ld a=vx*vx+vy*vy+vz*vz-vr*vr;
    ld b=x*vx+y*vy+z*vz+r*vr;
    ld c=x*x+y*y+z*z-r*r;

    if(b*b-a*c+eps>0){
        ld res1=(-b+sqrt(b*b-a*c))/a;
        ld res2=(-b-sqrt(b*b-a*c))/a;
        //cout<<res1<<" "<<res2<<endl;
        ld res=INF;
        if(res1+eps>0 && s1.r-s1.vr*res1+eps>0 && s2.r-s2.vr*res1+eps>0) res=min(res,res1);
        if(res2+eps>0 && s1.r-s1.vr*res2+eps>0 && s2.r-s2.vr*res2+eps>0) res=min(res,res2);
       // cout<<res<<endl;
        if(res!=INF) return res;
    }
    return -1;
}

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

    int n;
    while(cin>>n,n){
        vector<Star> stars;
        vector<Event> es;
        vector<int> used(n);
        vector<ld> res(n);
        for(int i=0;i<n;i++){
            ld x,y,z,vx,vy,vz,r,vr;
            cin>>x>>y>>z>>vx>>vy>>vz>>r>>vr;
            stars.push_back(Star(x,y,z,vx,vy,vz,r,vr));
            es.push_back(Event(i,i,r/vr));
        }
        for(int i=0;i<n;i++){
            for(int j=i+1;j<n;j++){
                ld ret=check(stars[i],stars[j]);
                //cout<<i<<" "<<j<<" "<<ret<<endl;
                if(ret!=-1) es.push_back(Event(i,j,ret));
            }
        }
        int sz=es.size();
        sort(es.begin(),es.end());
        for(int i=0;i<sz;i++){
            int s1=es[i].s1,s2=es[i].s2;
            if(used[s1]||used[s2]) continue;
            res[s1]=es[i].time;res[s2]=es[i].time;
            used[s1]=1;used[s2]=1;
        }
        for(int i=0;i<n;i++) cout<<fixed<<setprecision(10)<<res[i]<<endl;
    }
}


Measured memory_bytes: 3396
#include <bits/stdc++.h>

using ll = long long;
using Pii = std::pair<int, int>;
using Pll = std::pair<ll, ll>;

const ll INF = (ll)1e16;

using namespace std;

int main() {
    ios::sync_with_stdio(false);

    int N, K;
    cin >> N >> K;

    vector<int> V(N+1, 0);
    for (int i = 1; i <= N; ++i) {
        cin >> V[i];
    }

    int M = min(N, K);
    int ans = 0;
    for (int l = 0; l <= M; ++l) {
        for (int r = 0; l + r <= M; ++r) {
            int sum = 0;
            vector<int> x;
            for (int i = 1; i <= N; ++i) {
                if (l < i && i < N - r + 1) continue;
                x.push_back(V[i]);
                sum += V[i];
            }
            sort(x.begin(), x.end());
            for (int i = 0; i < min((int)x.size(), K - l - r) && x[i] < 0; ++i) {
                sum -= x[i];
            }
            ans = max(ans, sum);
        }
    }

    cout << ans << endl;

    return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
using P = pair<ll,ll>;
const ll mod = 1e9+7;
#define ALL(x) (x).begin(),(x).end()
#define REP(i,n) for(ll (i)=0;(i)<(n);(i)++)
#define REPS(i,n) for(ll (i)=1;(i)<=(n);(i)++)
#define RREP(i,n) for(ll (i)=(n-1);(i)>=0;(i)--)
#define RREPS(i,n) for(ll (i)=(n);(i)>0;(i)--)
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define UNIQUE(v) v.erase(unique(ALL(v)),v.end());

template<class T> inline void chmin(T& a, T b){
    if (a > b){
        a = b;
    }
}

template<class T> inline void chmax(T& a, T b){
    if (a < b){
        a = b;
    }
}

signed main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    cout<<fixed<<setprecision(10);
    int A,B,C;
    cin >> A >> B >> C;
    bool ok = 0;
    REPS(i,B){
        if(A*i%B == C){
            ok = 1;
        }
    }
    cout << (ok ? "YES" : "NO") << "\n";
}

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

int n, k, next;
int day[101];
int dp[101][4][4];
int solve(int i, int j, int k);

int main(void){
	fill_n(**dp,101*4*4,-1);
	fill_n(day, 101, 0);
	cin >> n >> k;
	for(int i = 0, a; i < k; i++){
		cin >> a;
		cin >> day[a];
	}
	cout << solve(1, 0, 0) << endl;
}

int solve(int i, int b1, int b2){
	if(i == n+1) return 1;
	if(dp[i][b1][b2] != -1) return dp[i][b1][b2];
	if(day[i] != 0){
		if(b1 == b2 && b1 == day[i]){return 0;}
		else return solve(i+1, day[i], b1)%10000;
	}
	int sum = 0;
	for(int next = 1; next <= 3; next++){
		if(b1 == b2 && b1 == next)continue;
		sum += solve(i+1, next, b1)%10000;
	}
	return dp[i][b1][b2] = sum%10000;
}

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

#define ll long long
#define endl '\n'
#define REP(i, a, n) for(int i=a; i<n; ++i)
#define pb push_back
#define sz(x) (int)((x).size())
#define all(x) (x).begin(), (x).end()

typedef pair<int, int> ii;
typedef vector<int> vi;
typedef vector<ii> vii;

const double PI = 3.141592653589793238460;
const ll mod = 1e9 + 7;

void FAST(){
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
}

int main(){
  FAST();

  double a, b;
  cin >> a >> b;

  cout << ceil((b - 1) / (a - 1)) << endl;
  return 0;
}


Measured memory_bytes: 384
#include <ios>
#include <iomanip>
#include <iostream>
#include <functional>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <string>
#include <sstream>
#include <complex>
#include <vector>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <set>
#include <climits>

using namespace std;
typedef long long int ll;
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(),(x).end()
#define MOD 1000000007
#define INF (1e9)
#define PI (acos(-1))
#define print(x) cout << x << endl
#define yes cout << "Yes" << endl
#define YES cout << "YES" << endl
#define no cout << "No" << endl
#define NO cout << "NO" << endl

ll gcd(ll a, ll b) { return b ? gcd(b,a%b) : a;}
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }
typedef pair <ll,ll> P;

int main()
{
    ll H, W;
    cin >> H >> W;
    rep(i, H) {
        rep(j, W) {
            string s;
            cin >> s;
            if (s == "snuke") {
                print((char)('A' + j) << i+1);
            }
        }
    }
    return 0;
}


Measured memory_bytes: 256
#include<stdio.h>
#define COUNT_RESET 0
#define LOOP_RESET 0
#define ARRAY_RESET 0

void array_reset(unsigned char * array, unsigned short size);
unsigned short serch_word(unsigned char * word, unsigned char * sent);
unsigned short s_scan_word(unsigned char * str, unsigned short length_max);

int main(){
	unsigned char word[10];
	unsigned char sent[1000];
	unsigned short word_length, sent_length;
	unsigned short count = 0;
	unsigned char sentence_end[] = {"END_OF_TEXT\n"};
	unsigned short i;
	
	array_reset(word, 10);
	array_reset(sent, 1000);
	
	word_length = s_scan_word(word, 1000);
	while(1){
		sent_length = s_scan_word(sent, 1000);
		if(serch_word(sentence_end, sent) == 1){
			break;
		}
		for(i = 0;i < word_length;i++){
			word[i] |= 0x60;
		}
		for(i = 0;i < sent_length;i++){
			sent[i] |= 0x60;
		}
		if(word_length == sent_length){
			count += serch_word(word, sent);
		}
		array_reset(sent, sent_length);
	}
	printf("%d\n", count);
	return 0;
}

void array_reset(unsigned char * array, unsigned short size)
{
	unsigned short usW_C_i; 	/* ループ変数 */
	/* 配列の初期化 */
	for(usW_C_i = COUNT_RESET;usW_C_i < size;usW_C_i++){
		*(array + usW_C_i) = ARRAY_RESET;
	}
}

/* 関数名：文字列入力 */
/* 概要：文字列を入力する。入力された文字列の長さを返す */
/* 引数：文字列を格納する配列の先頭アドレス、その配列の大きさ */
/* 戻り値：入力された文字列の長さ */
unsigned short s_scan_word(unsigned char * str, unsigned short length_max)
{
	unsigned short usW_C_count_text = COUNT_RESET; /* 文字列長カウンタ */
	unsigned short usW_C_i; /* ループ変数 */
	/* 文字列の入力 */
	for(usW_C_i = LOOP_RESET;usW_C_i < length_max;usW_C_i++){
		scanf("%c", str + usW_C_i); /* 入力終了の処理 */
		if((*(str + usW_C_i) == ' ') || (*(str + usW_C_i) == '\n')){
			break;
		}
		/* 文字数をカウント */
		usW_C_count_text++;
	}
	/* 文字列長を返す */
	return usW_C_count_text;
}

unsigned short serch_word(unsigned char * word, unsigned char * sent)
{
	unsigned int frg = 0;
	unsigned int i = 0;
	while(1){
		if(*(word + i) == '\n'){
			frg =1;
		}
		if(*(word + i) != *(sent + i)){
			break;
		}
		i++;
	}
	return frg;
} 


Measured memory_bytes: 2100
N, A, B = map(int, input().split())
if N == 1:
	if A == B: print(1)
	else: print(0)
	exit()
if A > B:
	print(0)
	exit()
min = A + B + ((N - 2) * A)
max = A + B + ((N - 2) * B)
print(max - min + 1)

Measured memory_bytes: 9016
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef unsigned int uint;
typedef unsigned char uchar;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;

#define REP(i,x) for(int i=0;i<(int)(x);i++)
#define REPS(i,x) for(int i=1;i<=(int)(x);i++)
#define RREP(i,x) for(int i=((int)(x)-1);i>=0;i--)
#define RREPS(i,x) for(int i=((int)(x));i>0;i--)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();i++)
#define RFOR(i,c) for(__typeof((c).rbegin())i=(c).rbegin();i!=(c).rend();i++)
#define ALL(container) (container).begin(), (container).end()
#define RALL(container) (container).rbegin(), (container).rend()
#define SZ(container) ((int)container.size())
#define mp(a,b) make_pair(a, b)
#define pb push_back
#define eb emplace_back
#define UNIQUE(v) v.erase( unique(v.begin(), v.end()), v.end() );
#define __builtin_popcount __builtin_popcountll
#define endl '\n'

template<class T> bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T> bool chmin(T &a, const T &b) { if (a>b) { a=b; return 1; } return 0; }
template<class T> ostream& operator<<(ostream &os, const vector<T> &t) {
    os<<"["; FOR(it,t) {if(it!=t.begin()) os<<","; os<<*it;} os<<"]"; return os;
}
template<class T> ostream& operator<<(ostream &os, const set<T> &t) {
    os<<"{"; FOR(it,t) {if(it!=t.begin()) os<<","; os<<*it;} os<<"}"; return os;
}
template<class S, class T> ostream& operator<<(ostream &os, const map<S, T> &t) {
    os<<"{"; FOR(it,t) {if(it!=t.begin()) os<<","; os<<*it;} os<<"}"; return os;
}
template<class S, class T> ostream& operator<<(ostream &os, const pair<S,T> &t) { return os<<"("<<t.first<<","<<t.second<<")";}
template<class S, class T> pair<S,T> operator+(const pair<S,T> &s, const pair<S,T> &t){ return pair<S,T>(s.first+t.first, s.second+t.second);}
template<class S, class T> pair<S,T> operator-(const pair<S,T> &s, const pair<S,T> &t){ return pair<S,T>(s.first-t.first, s.second-t.second);}

const int INF = 1<<28;
const double EPS = 1e-8;
const int MOD = 1000000007;


int T, n, m;

int main(int argc, char *argv[]){
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    vi d(3);
    REP(i, 3) {
        cin >> d[i];
    }
    sort(ALL(d));
    int ans = d[0] == d[2];
    puts(ans ? "Yes" : "No");
    return 0;
}


Measured memory_bytes: 256
#include<bits/stdc++.h>
typedef long long ll;
typedef unsigned long long ull;
using namespace std;
#define pb push_back
int dy[]={0, 0, 1, -1, 1, 1, -1, -1};
int dx[]={1, -1, 0, 0, 1, -1, -1, 1};

#define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--)
#define REP(i,n) for (int i=0;i<(n);i++)
#define RREP(i,n) for (int i=(n)-1;i>=0;i--)
#define mp make_pair
#define fi first
#define sc second
ll n;

typedef ll IS_PRIME_TYPE;
bool is_prime(IS_PRIME_TYPE n){
	bool f = true;
	if(n == 1) {
		return 0;
	}
	if(n == 2)
		return true;
	if(n % 2 == 0)
		return false;
	for(IS_PRIME_TYPE i = 3;i <= (int)(sqrt(n) + 0.1);i += 2){
		if(n % i == 0){
			f = false;
			break;
		}
	}
	return f;
}

bool ip[2000];

ll next_prime(ll n) {
	ll ret = n + 1;
	while(!ip[ret]) {
		ret++;
	}
	return ret;
}

ll in[2000];

int main(){
	cin >> n;

	FOR(i,2,n + 1) 
		ip[i] = is_prime(i);


	FOR(i,1,n + 1) {
		ll j = i;

		ll p = 2;
		while(j > 1) {
			if(j % p == 0) {
				j /= p;
				in[p]++;
			}else {
				p = next_prime(p);
			}
		}
	}

	ll ans = 1;
	FOR(i,2,n + 1) {
		(ans *= (in[i] + 1)) %= 1000000007;
	}
	cout << ans << endl;
	return 0;
}


Measured memory_bytes: 256
N, C, K = map(int,input().split())
T = sorted([int(input()) for _ in range(N)])
count = 0
ans = 0
if C == 1:
    print(N)
    exit()
for t in T:
    if count == 0:
        count = 1
        flag = t + K
    else:
        if t <= flag:
            count += 1
            if count == C:
                ans += 1
                count = 0
                if t == T[-1]:
                    ans -= 1
        else:
            ans += 1
            count = 1
            flag = t + K
        

print(ans+1)

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

int main(){
  int a, b, c, k; cin >> a >> b >> c >> k;
  int ma = max(a, b);
  ma = max(ma, c);
  int ans = a + b + c - ma;
  ma *= pow(2, k);
  cout << ans + ma << endl;
}

Measured memory_bytes: 256
n,m = map(int,input().split())
from collections import defaultdict
G = defaultdict(list)
for _ in range(m):
    a,b = map(int,input().split())
    G[a-1].append(b-1)
    G[b-1].append(a-1)


# G[v]: 頂点vに隣接する頂点list
# N: 頂点数

from collections import deque
dist = [-1]*n
que = deque([0])
dist[0] = 0
before = [0] * n
while que:
    v = que.popleft()
    d = dist[v]
    for w in G[v]:
        if dist[w] > -1:
            continue
        dist[w] = d + 1
        before[w] = v
        que.append(w)

if -1 in dist:
    print("No")
    exit()
else:
    print("Yes")
    for d in before[1:]:
        print(d+1)


Measured memory_bytes: 107444
#include<bits/stdc++.h>
#include<stdlib.h>
#include<string.h>
#define ll long long
#define ull unsigned long long int
#define T int test; scanf("%d",&test); while(test--)
#define pb push_back
#define in insert
#define PI acos(-1)
#define sc(n) scanf("%d",&n)
#define sc2(a,b) scanf("%d%d",&a,&b)
#define lsc(n) scanf("%lld",&n)
#define lsc2(a,b) scanf("%lld%lld",&a,&b)
#define rep(i,n) for(i=0;i<n;i++)
#define fr(i,a,b) for(i=a;i<b;i++)
#define gcd(a,b) __gcd(a,b)
#define gcd3(a,b,c) __gcd(__gcd(a,b),c)
#define lcm(a,b) (a*b)/__gcd(a,b)
using namespace std;



int main()
{
	double d,a;
	cin >> d >> a;
	cout << ceil(d/a) << endl;
    return 0;
}


Measured memory_bytes: 256
#define _USE_MATH_DEFINES
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<sstream>
#include<utility>
#include<map>
#include<climits>
#include<vector>
#include<queue>
#include<algorithm>
#include<set>
#include<stack>
#include<functional>
#include<cmath>
#include<iostream>
using namespace std;
typedef long long ll;
typedef pair<int,int>P;
typedef pair<int,P>MP;
typedef vector<vector<int>> MX;

const ll MOD=1e9+7;
const int INF=1000000000;
//dp[digit][less flag][include 3][include 5][include 7][inccude other]


int dd(string N)
{
	int dp[11][2][2][2][2][2]={0};
	dp[0][0][0][0][0][0]=1;
	for(int i=0;i<N.size();i++)
	{
		int D=N[i]-'0';

		for(int j=0;j<2;j++)
			for(int i3=0;i3<2;i3++)
				for(int i5=0;i5<2;i5++)
					for(int i7=0;i7<2;i7++)
						for(int o=0;o<2;o++)
						{
							for(int d=0;d<=(j?9:D);d++)
							{
								dp[i+1][j||(d<D)][i3||d==3][i5||d==5][i7||d==7][o||(d!=3&&d!=5&&d!=7)]+=dp[i][j][i3][i5][i7][o];
							}
						}
	}
	return dp[N.size()][0][1][1][1][0]+dp[N.size()][1][1][1][1][0];
}


int main()
{
	int res=0;
	string N,p="";
	cin>>N;
	for(int i=0;i<N.length();i++)
	{
		p+="9";
		if(i==N.length()-1)res+=dd(N);
		else res+=dd(p);
	}

	cout<<res<<endl;
}

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

int main() {
  long n,ans=0;
  cin >> n;
  vector<long> a(n),kyusyu(n),kanou(n,1);
  for(long i=0;i<n;i++) cin >> a[i];
  sort(a.begin(),a.end());
  long j=0;
  for(long i=0;i<n;i++) {
    if(i!=0) kyusyu[i]=kyusyu[i-1];
    for(;j<n;j++) {
      if(a[j]>a[i]*2) break;
      kyusyu[i]+=a[j];
    }
  }
  j=0;
  for(long i=0;i<n-1;i++) {
    while(j+1!=n) {
      if(a[j+1]>kyusyu[i]*2) break;
      j++;
    }
    kanou[j]+=kanou[i];
  }
  ans=kanou.back();
  
  cout << ans << endl;
}

Measured memory_bytes: 5588
#include <bits/stdc++.h>

using namespace std;

template <long long Mod> struct ModInt { /* {{{ */
  long long v;
  constexpr ModInt(const long long x = 0) {
    v = x % Mod;
    if (v < 0) {
      v += Mod;
    }
  }
  constexpr ModInt operator+(const ModInt rhs) const { return ModInt(*this) += rhs; }
  constexpr ModInt operator-(const ModInt rhs) const { return ModInt(*this) -= rhs; }
  constexpr ModInt operator*(const ModInt rhs) const { return ModInt(*this) *= rhs; }
  constexpr ModInt operator/(const ModInt rhs) const { return ModInt(*this) /= rhs; }
  const ModInt &operator+=(const ModInt rhs) {
    v += rhs.v;
    if (v >= Mod) {
      v -= Mod;
    }
    return *this;
  }
  constexpr ModInt &operator-=(const ModInt rhs) {
    if (v < rhs.v) {
      v += Mod;
    }
    v -= rhs.v;
    return *this;
  }
  constexpr ModInt &operator*=(const ModInt rhs) {
    v = v * rhs.v % Mod;
    return *this;
  }
  constexpr ModInt &operator/=(ModInt rhs) {
    long long exp = Mod - 2;
    while (exp) {
      if (exp & 1) {
        *this *= rhs;
      }
      rhs *= rhs;
      exp >>= 1;
    }
    return *this;
  }
  friend ostream &operator<<(ostream &s, ModInt<Mod> m) {
    s << m.v;
    return s;
  }
  friend istream &operator>>(istream &s, ModInt<Mod> m) {
    s >> m.v;
    return s;
  }
}; /* }}} */

const int mod = 1e9 + 7;
using modint = ModInt<mod>;

modint fpow(int i, int exp) {
  modint a = i;
  modint m = 1;
  while (exp) {
    if (exp & 1) m *= a;
    a *= a;
    exp >>= 1;
  }
  return m;
}

int main() {
  int N, K;
  cin >> N >> K;
  vector<modint> cnt(K + 1);
  for (int i = K; i >= 1; i--) {
    int c = K / i;
    modint m = fpow(c, N);
    for (int j = 2; j <= c; j++) {
      m -= cnt[i * j];
    }
    cnt[i] = m;
  }
  modint ans = 0;
  for (int i = 1; i <= K; i++) {
    ans += cnt[i] * i;
  }
  cout << ans << endl;

  return 0;
}
/* vim:set fdm=marker: */


Measured memory_bytes: 4052
#include <bits/stdc++.h>

using namespace std;
typedef long long ll;

#define rep(i, N) for (int i = 0; i < (int)N; i++)
const ll MOD = pow(10,9)+7;
const ll LLINF = pow(2,61)-1;
const int INF = pow(2,30)-1;


int main() {
  int N; cin >> N;
  int a[N]; rep(i,N) cin >> a[i];

  int result = 0, count = 0;
  rep(i,N) {
    if (i==0||a[i]==a[i-1]) count++;
    else {
      result += count/2;
      count = 1;
    }
  }
  result += count/2;
  cout << result << endl;
  return 0;
}

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

int main(void){
	long long N;
	long long A[5];
	cin >> N;
	for(int i=0;i<5;i++)cin >> A[i];
	sort(A,A+5);
	cout << ((N+A[0]-1)/A[0])+4 << endl;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
#define ll long long
#define ALL(x) x.begin(),x.end()
#define MOD (1000000000+7)
using namespace std;
#define PI 3.14159265359
#define tMOD 998244353
#define mkpr(x,y) make_pair(x,y)

int main(){
    ll H,W,N;
    cin>>H>>W>>N;
    vector<ll> a(N);
    for(ll i=0;i<N;i++)cin>>a[i];
    //vector<vector<ll>> field(H,vector<ll>(W));
    ll field[1000][1000]={0};
    
    ll ind =0;

        for(ll i=0;i<H;i++){
        if(i%2==0){
        for(ll j=0;j<W;j++){
            if(a[ind]!=0){
            field[i][j]=ind+1;
            a[ind]--;
            }
            else{
                ind++;
                field[i][j]=ind+1;
            a[ind]--;
            }
        }
        }
        else{
            for(ll j=W-1;j>=0;j--){
            if(a[ind]!=0){
            field[i][j]=ind+1;
            a[ind]--;
            }
            else{
            ind++;
            field[i][j]=ind+1;
            a[ind]--;
            }
        }
        }
    }


    for(ll i=0;i<H;i++){
        for(ll j=0;j<W;j++){
            cout<<field[i][j]<<" ";
        }
         cout<<endl;
    }











}


/*

    for(ll i=0;i<H;i++){
        if(i%2==0){
        for(ll j=0;j<W;j++){
            if(a[ind]!=0){
            field[i][j]=ind+1;
            a[ind]--;
            }
            else{
                ind++;
                field[i][j]=ind+1;
            a[ind]--;
            }
        }
        }
        else{
            for(ll j=W-1;j>=0;j++){
            if(a[ind]!=0){
            field[i][j]=ind+1;
            a[ind]--;
            }
            else{
                ind++;
                field[i][j]=ind+1;
            a[ind]--;
            }
        }
        }
    }

*/




Measured memory_bytes: 11496
#include <cstdio>
#include <cmath>
#include <cstring>
#include <algorithm>
using namespace std;
int a[105];
int main()
{
	int n;
	while(~scanf("%d",&n)){
		int ans = 0;
		for(int i = 1; i <= n; i++) scanf("%d",&a[i]);
		sort(a + 1, a + n + 1);
		for(int i = n; i > 1; i--){
			ans += a[i] - a[i-1];
		}
		printf("%d\n",ans);
	}
	return 0;
}


Measured memory_bytes: 128
#include <stdio.h>
#define MOD 1000000007

int main()
{   long long n,k,i,j;
    scanf("%lld%lld",&n,&k);
    long long a[2001];
    for(int i=0;i<n;i++){
        scanf("%lld",&a[i]);
    }
    long long front=0,rear=0;
    for(i=0;i<n;i++){
        for(j=i+1;j<n;j++){
            if(a[i]<a[j]){
                rear++;
            }
        }
        for(j=0;j<i;j++){
            if(a[i]<a[j]){
                front++;
            }
        }
    }
    long long ans=(rear+front)*((k-1)*k/2%MOD)+front*k;
        
    printf("%lld",ans%MOD);

    return 0;
}


Measured memory_bytes: 128
#include <bits/stdc++.h>
	    
	    
	    using namespace std;
	
	    #define ll long long
	    #define do double
	    #define ff first
	    #define ss second
	    #define FOR(a,n) for(i=0;i<n;i++){    cin>>a[i];}
	    #define pb push_back
	    #define mp make_pair
	    #define inf LONG_LONG_MAX
	    #define mod  1000000007
	    #define FAST ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
	
	    

	ll d,x,y;
	void extendedEuclid(ll A, ll B) 
	{
	    if(B == 0) {
	        d = A;
	        x = 1;
	        y = 0;
	    }
	    else {
	        extendedEuclid(B, A%B);
	        int temp = x;
	        x = y;
	        y = temp - (A/B)*y;
	    }
	}

	ll power(ll x,ll y, ll p) 
	{ 
	    ll res = 1; 
	    x = x % p;
	    while (y > 0) 
	    {  // If y is odd, multiply x with result 
	        if (y & 1) 
	            res = (res*x) % p;
	            
	        y = y>>1; 
	        x = (x*x) % p;   
	    } 
	    return res; 
	} 



map<ll,ll> par,val;
void ini()
{
	for(ll i=0;i<500010;i++)
		{
			par[i]=i;
		}
}

ll root(ll x)
{
	while(par[x]!=x)
	{
		par[x]=par[par[x]];
		x=par[x];
	}
	return x;
}

void uni(ll x,ll y)
{
	x=root(x);
	y=root(y);
		par[y]=par[x];
}

int gcdExtended(int a, int b, int *x, int *y) 
{ 

    if (a == 0) 
    { 
        *x = 0, *y = 1; 
        return b; 
    } 
    int x1, y1;
    int gcd = gcdExtended(b%a, a, &x1, &y1); 
    *x = y1 - (b/a) * x1; 
    *y = x1;
    return gcd; 
}  
int modInverse(int b, int m) 
{ 
    int x, y; 
    int g = gcdExtended(b, m, &x, &y); 
    if (g != 1) 
        return -1; 
    return (x%m + m) % m; 
}
ll isPrime(ll n)
{
    if(n==0||n==1)
        return n;
    if(n%2==0)
        return (ll)2;
    if(n%3==0)
        return (ll)3;
    else
    {
        for(ll i=5;i*i<=n;i+=6)
        {
            if(n%i==0)
                return i;
            if(n%(i+2)==0)
                return (i+2);
        }
        return n;
    }
}
const ll N=10000010;
vector<bool> prime(N);
vector<ll> spf(N);
void sieve()
{
	fill(prime.begin(),prime.end(),true);
	prime[1]=false;
	prime[0]=false;
	ll i,j;
	for(i=2;i*i<=N;i++)
	{
		if(prime[i]==true)
		{	spf[i]=i;
			for(j=i*i;j<N;j+=i)
			{
				prime[j]=false;
				if(spf[j]==0)
					spf[j]=i;
			}
		}
	}
}
int main()
{
	FAST;
	ll n,i,j,k,m;
	string s;
	cin>>s;
	map<char,ll> fr;
	for(i=0;i<4;i++)
	{
		fr[s[i]]++;
	}
	for(i=0;i<4;i++)
	{
		if(fr[s[i]]!=2)
			return cout<<"No",0;
	}
	cout<<"Yes";

	
}

Measured memory_bytes: 79616
N, K = map(int, input().split())
al = list(map(int, input().split()))

visited= [1]
ed = set([1])
for i in range(K):
    next_town  = al[visited[i] - 1]
    if next_town in ed:
        loop_sta = visited.index((next_town)) #　visited_townsにおけるループ開始のインデックス
        loop_end = len(visited) #visited_townsにおけるループの終わりのインデックス
        loop_length = loop_end - loop_sta #繰り返すループの長さ
        amari = (K - loop_sta) % loop_length
        ans = visited[loop_sta + amari]
        print(ans)
        exit()
    else:
        visited.append(next_town)
        ed.add(next_town)
        continue

else:
    print(visited[-1])



Measured memory_bytes: 32376
#include <bits/stdc++.h>
using namespace std;
typedef long long int lld;
typedef vector<int> vi;
typedef pair<int,int> pi;
#define F first
#define S second
#define PB push_back
#define MOD 1000000007
#define MP make_pair
#define rep(i,a,b) for (int i = a; i < b; i++)
lld l,x,y,n,m,i,z,p,s,e,q,j,k,c,d,t,a,b;string s1,s2;
int main()
{
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin>>n;
  a=b=0;p=0;lld tp=0;
  rep(i,0,n)
  {
    cin>>t>>x>>y;
    tp=t-tp;
    k=abs(x-a)+abs(y-b);
    if(k!=0&&tp%k!=0&&p==0)
      {
        p=1;
        //break;
      }
    else if(k==0&&tp%2!=0&&p==0)
      {
        p=1;
       // break;
      }
    a=x,b=y;tp=t;
  }
  if(p)
    cout<<"No";
  else
    cout<<"Yes";
}

Measured memory_bytes: 256
#pragma region

#include <bits/stdc++.h>
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define _rep3(i, begin, end) for (register int i = (begin), i##_end = (end); i < i##_end; i++)
#define _irep3(i, begin, end) for (register int i = (end)-1, i##_begin = (begin); i >= i##_begin; i--)
#define _rep2(i, n) _rep3(i, 0, n)
#define _irep2(i, n) _irep3(i, 0, n)
#define _overload3(_1, _2, _3, name, ...) name
#define rep(...) _overload3(__VA_ARGS__, _rep3, _rep2, )(__VA_ARGS__)
#define irep(...) _overload3(__VA_ARGS__, _irep3, _irep2, )(__VA_ARGS__)
#define out(x) cout << (x) << '\n';
#define debug(x) cerr << #x << " = " << (x) << " (line: " << __LINE__ << ") " << endl;

using namespace std;
using ll = long long;
using vi = vector<int>;
using vl = vector<long long>;
using vb = vector<bool>;
using vvi = vector<vector<int>>;
using vvl = vector<vector<long long>>;
using vvb = vector<vector<bool>>;

template <typename T>
istream &operator>>(istream &is, vector<T> &vec) {
  for (auto &v : vec) is >> v;
  return is;
}
template <typename T1, typename T2>
istream &operator>>(istream &is, pair<T1, T2> &pair) {
  cin >> pair.first >> pair.second;
  return is;
}
template <typename T>
ostream &operator<<(ostream &os, const vector<T> &vec) {
  os << "[ ";
  rep(i, vec.size()) i == 0 ? os << vec[i] : os << ", " << vec[i];
  os << " ]";
  return os;
}

template <class T>
bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}

template <class T>
bool chmin(T &a, const T &b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}

void init() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(16);
}

#pragma endregion

#define MOD 1000000007
#define INF 2147483647

int main() {
  init();

  int D;
  cin >> D;
  vi c(26);
  cin >> c;
  vector<vector<pair<int, int>>> s(D, vector<pair<int, int>>(26));
  rep(i, D) {
    rep(j, 26) {
      cin >> s[i][j].first;
      s[i][j].second = j;
    }
    sort(all(s[i]));
  }

  rep(i, D) {
    out(s[i][0].second + 1);
  }
}


Measured memory_bytes: 3748
import java.util.Scanner;
public class Main {
	static int mod=1000000007;
	static Scanner scan=new Scanner(System.in);
	static long gcd (long a, long b) {return b>0?gcd(b,a%b):a;}
	static long lcm (long a, long b) {return a*b/gcd(a,b);}
	static int max(int a,int b) {return a>b?a:b;}
	static int min(int a,int b) {return a<b?a:b;}
	static long factorial(int i) {return i==1?1:i*factorial(i-1);}
	static int lower_bound(int a[],int key) {
		int low=0,high=a.length;
		while(low<high) {
			int mid=((high-low)/2)+low;
			if(a[mid]<=key)low=mid+1;
			else high=mid;
		}
		return high;
		}
	static int upper_bound(int a[],int key) {
		int low=0,high=a.length;
		while(low<high) {
			int mid=((high-low)/2)+low;
			if(a[mid]<key)low=mid+1;
			else high=mid;
		}
		return high;
		}
	static boolean isPrime (int n) {
		if (n==2) return true;
		if (n<2 || n%2==0) return false;
		double d = Math.sqrt(n);
		for (int i=3; i<=d; i+=2)if(n%i==0){return false;}
		return true;
	}
	static int upper_division(int a,int b) {
		if(a%b==0) {
			return a/b;
		}
		else {
			return a/b+1;
		}
	}
	static long lupper_division(long a,long b) {
		if(a%b==0) {
			return a/b;
			}
		else {
			return a/b+1;
		}
	}
	static long lmax(long a,long b) {return Math.max(a, b);}
	static long lmin(long a,long b) {return Math.min(a, b);}
	static int[] setArray(int a) {
		int b[]=new int[a];
		for(int i=0;i<a;i++) {
			b[i]=scan.nextInt();
		}
		return b;
	}
	static String reverce(String str) {
		String strr="";
		for(int i=str.length()-1;i>=0;i--) {
			strr+=str.charAt(i);
		}
		return strr;
	}
	static long modpow(long a,long n) {
		if(n==0) return 1;
		else if(n==1)return a;
		long tmp=modpow(a,n/2);
		tmp%=mod;
		tmp*=tmp;
		tmp%=mod;
		if(n%2==0)return tmp;
		else return (tmp*a)%mod;
	}
	public static void main(String[] args) {
		int a=scan.nextInt();
			System.out.println(a*a*a);
	}
}

Measured memory_bytes: 23124
#include <iostream>
#include <string>
#include <vector>
#include <cmath>
#include <iomanip>
#include <algorithm>
using namespace std;



int main() {
	int a, b, c;
	cin >> a >> b >> c;

	int max_ab = max(a, b);
	int max_ac = max(a, c);
	int max_bc = max(b, c);

	if (max_ab == max_ac) {
		cout << max_ab * 10 + max(b, c) + min(b, c) << endl;
	}
	else if (max_ab == max_bc) {
		cout << max_ab * 10 + max(a, c) + min(a, c) << endl;
	}
	else if (max_ac == max_bc) {
		cout << max_ac * 10 + max(a, b) + min(a, b) << endl;
	}

	return 0;
}

Measured memory_bytes: 256
from bisect import bisect, bisect_left
from collections import Counter, defaultdict
from functools import reduce
from itertools import accumulate
from operator import itemgetter, xor, mul

import sys
#input = sys.stdin.readline

def inpl(): return list(map(int, input().split()))
S = input()
T = input()
P = defaultdict(set)

for i in range(len(S)):
    P[S[i]].add(T[i])
    

for v in P.values():
    if len(v) >= 2:
        print("No")
        break
else:
    if Counter(Counter(S).values()) == Counter(Counter(T).values()):
        print("Yes")
    else:
        print("No")

Measured memory_bytes: 4392
from collections import defaultdict
S=input()
K=int(input())
d=defaultdict(int)
first_last=0
memo=[0]*len(S)
count=0
for i in range(len(S)):
  if i>=1:
    if (S[i]==S[i-1])and(memo[i-1]==0):
      count+=1
      memo[i]=1
      
      
memo2=[0]*len(S)
count2=0
if (S[0]==S[-1]) and (memo[-1]==0):
  count2+=1
  memo2[0]=1
  first_last+=1
  for i in range(1,len(S)):
    if (S[i]==S[i-1])and(memo2[i-1]==0):
        count2+=1
        memo2[i]=1
      
type3=0
if (S[0]==S[-1])and(memo2[-1]==1):
  type3=1

if type3==1:
  if K%2==1:
    print(count*(K//2+1) + count2*(K//2))
  else:
    print(count*(K//2)+count2*(K//2))
elif first_last==1:
  print(count + count2*(K-1))
else:
  print(count*K)





Measured memory_bytes: 3316
#include "bits/stdc++.h"
#define rep(i,n) for(int i=0;i<(n);i++)
using namespace std;
using ll = long long;

int main() {
	vector<int> x(5);
	for (int i = 0; i < 5; i++) {
		cin >> x[i];
		if (x[i] == 0) {
			
			cout << i + 1 << endl;
			break;
		}
	}
	return 0;
}

Measured memory_bytes: 3588
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

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

    static class ABeginner {
        public void solve(int testNumber, FastReader s, PrintWriter out) {
            int n = s.nextInt();
            int r = s.nextInt();
            if (n >= 10) {
                out.println(r);
            } else {
                out.println(r + 1000 - (100 * n));
            }
        }

    }

    static class FastReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private FastReader.SpaceCharFilter filter;

        public FastReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }
}



Measured memory_bytes: 21332
/*
                    author         : TAPAN SAVANI 
                    codeforces     : savanitapan2001
                    codechef       : savanitapan17
*/

/*
------------------------------------------------------------------------

░██╗░░░░░░░██╗░█████╗░██████╗░██╗░░██╗  ██╗░░██╗░█████╗░██████╗░██████╗░
░██║░░██╗░░██║██╔══██╗██╔══██╗██║░██╔╝  ██║░░██║██╔══██╗██╔══██╗██╔══██╗
░╚██╗████╗██╔╝██║░░██║██████╔╝█████═╝░  ███████║███████║██████╔╝██║░░██║
░░████╔═████║░██║░░██║██╔══██╗██╔═██╗░  ██╔══██║██╔══██║██╔══██╗██║░░██║
░░╚██╔╝░╚██╔╝░╚█████╔╝██║░░██║██║░╚██╗  ██║░░██║██║░░██║██║░░██║██████╔╝
░░░╚═╝░░░╚═╝░░░╚════╝░╚═╝░░╚═╝╚═╝░░╚═╝  ╚═╝░░╚═╝╚═╝░░╚═╝╚═╝░░╚═╝╚═════╝░
 
------------------------------------------------------------------------
*/

#include <bits/stdc++.h>
using namespace std;

#define HAPPY_CODING              \
    ios_base::sync_with_stdio(0); \
    cin.tie(NULL);                \
    cout.tie(NULL);
#define pb push_back
#define mp make_pair
#define Debug(x) cout << #x " = " << (x) << endl
#define SORT(a) sort(a.begin(), a.end())
#define SORTR(a) sort(a.rbegin(), a.rend())
#define mod 1000000007
#define pi 3.141592653589793238
#define ll long long int
#define ull unsigned long long
#define be begin()
#define en end()
#define FOR(i, a, b) for (long long int i = a; i < b; i++)
#define FORI(i, a, b) for (int i = a; i >= b; i--)

typedef vector<int> VI;
typedef vector<ll> VL;
typedef pair<int, int> PI;
typedef pair<ll, ll> PL;
typedef vector<PI> VPI;

int main()
{
    HAPPY_CODING;

    long long int a,b,c,d;
    cin >> a >> b >> c >> d;

    long long int ans = max(a*c, a*d);
    ans = max(ans, b*c);
    ans = max(ans, b*d);
    
    cout << ans << "\n";

    return 0;
}


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

int main(){
    int a, b;
    cin >> a >> b;
    if(a >= 10 || b >= 10) cout << -1 << endl;
    else cout << a*b << endl;
    return 0;
}

Measured memory_bytes: 3616
S = input()
K = int(input())
N = len(S)
#最初の1回
ans = 0
prev = S[0]
endchange = False
for i in range(1,N):
    if S[i] == prev:
        ans += 1
        prev = 0
        if i == N:
            endchange = True
    else:
        prev = S[i]

if all([s == S[0] for s in S]):
    print((N*K)//2)

elif K==1 or S[0] != S[-1]:
    print(ans * K)
else:
    front = 1
    while 1:
        if S[front] == S[0]:
            front += 1
        else:break
    back = -1
    while 1:
        if S[back] == S[0]:
            back -= 1
        else:break
    back = -1-back
    print(ans*K + ((front+back)//2 - front//2 - back//2) * (K-1))


Measured memory_bytes: 3064
#include <bits/stdc++.h>
using namespace std;
#define all(c) (c).begin(),(c).end()
#define rrep(i,n) for(int i=(int)(n)-1;i>=0;i--)
#define REP(i,m,n) for(int i=(int)(m);i<(int)(n);i++)
#define rep(i,n) REP(i,0,n)
#define iter(c) __typeof((c).begin())
#define tr(it,c) for(iter(c) it=(c).begin();it!=(c).end();it++)
#define mem(a) memset(a,0,sizeof(a))
#define pb(a) push_back(a)
#define in(a) insert(a)
#define R cin>>
#define F first
#define S second
#define Y typename
#define ll long long
#define GM(_1,_2,_3,N,...)N
#define pr(...) GM(__VA_ARGS__,pr3,pr2,pr1)(__VA_ARGS__)
template<Y T>void pr1(T a){cout<<a<<'\n';}
template<Y T,Y T2>void pr2(T a,T2 b){cout<<a<<' '<<b<<'\n';}
template<Y T,Y T2,Y T3>void pr3(T a,T2 b,T3 c){cout<<a<<' '<<b<<' '<<c<<'\n';}
template<Y T>void PR(T a,int n){rep(i,n){if(i)cout<<' ';cout<<a[i];}cout<<'\n';}
bool check(int n,int m,int x,int y){return x>=0&&x<n&&y>=0&&y<m;}
const ll MAX=1000000007,MAXL=1LL<<60,dx[4]={-1,0,1,0},dy[4]={0,1,0,-1};
typedef pair<int,int> P;
typedef pair<P,P> P2;

int d[51][51][51][51];

void Main() {
  int n,m;
  while(cin >> m >> n && n) {
    string s[n],t[n];
    rep(i,n) cin >> s[i] >> t[i];
    int sx1,sy1,sx2,sy2;
    rep(i,n) {
      rep(j,m) {
	if(s[i][j]=='L') sx1=i,sy1=j;
	if(t[i][j]=='R') sx2=i,sy2=j;
      }
    }
    mem(d);
    queue<P2> que;
    que.push(P2(P(sx1,sy1),P(sx2,sy2)));
    d[sx1][sy1][sx2][sy2]=1;
    bool ck=0;
    while(!que.empty()) {
      P2 p=que.front();que.pop();
      int nx1=p.F.F,ny1=p.F.S,nx2=p.S.F,ny2=p.S.S;
      if(s[nx1][ny1]=='%' && t[nx2][ny2]=='%') {ck=1;break;}
      if(s[nx1][ny1]=='%' || t[nx2][ny2]=='%') continue;
      rep(i,4) {
	int x1=nx1+dx[i],y1=ny1+dy[i],x2=nx2+dx[i],y2=ny2+dy[i];
	if(i%2) {x2+=dx[(i+2)%4]*2;y2+=dy[(i+2)%4]*2;}
	if(!check(n,m,x1,y1) || s[x1][y1]=='#') x1=nx1,y1=ny1;
	if(!check(n,m,x2,y2) || t[x2][y2]=='#') x2=nx2,y2=ny2;
	if(d[x1][y1][x2][y2]) continue;
	d[x1][y1][x2][y2]=1;
	que.push(P2(P(x1,y1),P(x2,y2)));
      }
    }
    if(ck) pr("Yes");
    else pr("No");
  }
}

int main() {
  ios::sync_with_stdio(0);cin.tie(0);Main();
  return 0;
}


Measured memory_bytes: 28576
#include <iostream>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
using namespace std;
const int INF = 0x3f3f3f3f;
const int NIL = -1;
const int MAXN = 100005;

struct Node{ int p, l, r;}T[MAXN];

int n, D[MAXN];

void print(int u){
	cout << "node " << u << ": parent = " << T[u].p;
	cout << ", depth = " << D[u] <<", ";
	if(T[u].p == NIL)	cout <<"root, [";
	else if(T[u].l == NIL)	cout << "leaf, [";
	else	cout << "internal node, [";
	for(int c = T[u].l, i = 0; c != NIL; c = T[c].r, i++){
		if(i)
			cout << ", ";
		cout << c;
	}
	cout << "]" <<endl;
}

void setDepth(int u, int p){
	D[u] = p;
	if(T[u].r != NIL)
		setDepth(T[u].r
			, p);
	if(T[u].l != NIL)
		setDepth(T[u].l, p + 1);
}

int main(){
	cin >> n;
	int p, num, temp, l, loc;
	for(int i = 0; i < n; i++)	T[i].p = T[i].l = T[i].r = NIL;	
	for(int i = 0; i < n; i++){
		cin >> p >> num;
		for(int j = 0; j < num; j++){
			cin >> temp;
			if(!j)
				T[p].l = temp;
			else
				T[l].r = temp;
			l = temp;
			T[l].p = p;
		}
	}
	for(int i = 0; i < n; i++)
		if(T[i].p == NIL)
			loc = i;
	setDepth(loc, 0);
	for(int i = 0; i < n; i++)	print(i);
	return 0;
}

Measured memory_bytes: 7664
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)

int main() {
  int A, B;
  cin >> A >> B;
  int cnt = 0;
  for (int i = A; i < B + 1; i++) {
      int i10000 = i/10000;
      int i1000 = (i - i10000*10000) / 1000;
      int i100 = (i - i10000*10000 - i1000*1000) / 100;
      int i10 = (i - i10000*10000 - i1000*1000 - i100*100) / 10;
      int i1 = i - i10000*10000 - i1000*1000 - i100*100 - i10*10;
      if (i10000 == i1 && i1000 == i10) {
          cnt++;
      }
  }
  cout << cnt << endl;
}

Measured memory_bytes: 256