akhauriyash/Code-Regression huggingface dataset:
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main(){
    int N, M;
    cin >> N;
    vector<string> blue(N);
    for(int i=0; i < N; i++){
        cin >> blue.at(i);
    }

    cin >> M;
    vector<string> red(M);
    for(int i=0; i < M; i++){
        cin >> red.at(i);
    }

    int max_point = 0;
    for(int i = 0; i < N; i++){
        string key = blue.at(i);
        int blue_count = 0;
        int red_count = 0;

        for(int j = 0; j < N; j++){
            if (blue.at(j) == key){
                blue_count++;
            }
        }
        for(int j = 0; j < M; j++){
            if (red.at(j) == key){
                red_count++;
            }
        }
        
        int point = blue_count - red_count;
        if(max_point < point){
            max_point = point;
        }
    }

    if(max_point > -1){
        cout << max_point << endl;
    } else {
        cout << 0 << endl;
    }
}

Measured memory_bytes: 256
#include<iostream>
using namespace std;
int main(){
  int A,B,C,D,E;
  cin>>A>>B;
  C=A+A-1;
  D=A+B;
  E=B+B-1;
  if(C>=D&&C>=E){
    cout<<C;
  }
  else if(D>=E&&D>=C){
    cout<<D;
  }
  else if(E>=C&&E>=D){
    cout<<E;
  }
}

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

#define rep(i, n) for(int (i) = 0; i < (n); ++(i))

using ll = long long int;
const ll MOD = 1e9 + 7;

int main() {
  int N;
  std::cin >> N;
  std::vector<int> A(N);
  std::map<int, int> cnt;
  rep(i, N) {
    std::cin >> A[i];
    ++cnt[A[i]];
  }
  std::sort(A.begin(), A.end());

  std::vector<bool> dp(1000001, true);

  int ans = 0;
  rep(i, N) {
    if(! dp[A[i]]) continue;
    if(cnt[A[i]] == 1) {
      ++ans;
    }
    int sub = A[i];
    while(sub <= 1000000) {
      dp[sub] = false;
      sub += A[i];
    }
  }

  std::cout << ans << '\n';
}


Measured memory_bytes: 13456
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
typedef pair<int, int> P;
ll Mod = 1000000007;
int main() {
  ll N;
  ll K;
  cin >> N >> K;
  ll A[N];
  ll T[N];
  ll U[N];
  for (int i = 0; i < N; i++) {
    cin >> A[i];
    T[i] = 0;
    U[i] = 0;
  }
  for (int i = 0; i < N; i++) {
    for (int j = 0; j < N; j++) {
      if (A[i] > A[j]) {
        T[i]++;
        if (i < j) {
          U[i]++;
        }
      }
    }
  }
  ll ans = 0;
  for (int i = 0; i < N; i++) {
    ll a = (K - 1) * (T[i]);
    a %= Mod;
    a += 2 * U[i];
    a %= Mod;
    a *= K;
    a %= Mod;
    a *= 500000004;
    a %= Mod;
    ans += a;
    ans %= Mod;
  }
  cout << ans << endl;
  return 0;
}


Measured memory_bytes: 256
'use strict';
(function(stdin) {
  var inputs = stdin.toString().trim().split('\n');

  (function(S) {
    // ????????????????????????
    var h = Math.floor(S / (60*60));
    var m = Math.floor((S - 60*60*h) / 60);
    var s = S - 60*60*h - 60*m;

    console.log('%d:%d:%d', h, m, s);
    //print('%d:%d:%d', h, m, s);


  })(parseInt(inputs[0], 10)); // ??°?????????

}(require('fs').readFileSync('/dev/stdin', 'utf8')));

Measured memory_bytes: 15580
def gcd_core(a, b):
    if b == 0:
        return a
    else:
        return gcd_core(b, a % b)


def gcd(arr):
    g = gcd_core(arr[0], arr[1])
    for i in range(2, len(arr)):
        g = gcd_core(g, arr[i])
    return g

n = int(input())
s = input()
k = int(input())

key = s[k-1]
ans = ""
for i in range(n):
    if s[i] == key:
        ans += s[i]
    else:
        ans += "*"

print(ans)











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

typedef long long ll;
typedef pair<int,int> P;
typedef map<int,int> M;
typedef vector<int> V;
typedef queue<int> Q;
typedef pair<long,long> PLL;
typedef map<long,long> MLL;
typedef vector<long long> VLL;
typedef vector<pair<int,int>> VP;
typedef vector<vector<int>> VV;
#define INF (int)(1e9+1)
#define MAXX (int)1.1529215e+18
#define inf 999999
#define EPS (1e-7)
#define MOD (ll)(1e9+7)
#define rep(i,n) for(int i=0; i<(int)(n);i++)
#define REP(i,n) for(int i=1;i<=(int)(n);i++)
#define rrep(i,n) for(int i=(int)(n-1);i>=0;i--)
#define FOR(i,k,n) for(int i=(k);i<(int)(n);i++)
#define ALL(a)  a.begin(),a.end()
#define RALL(a) a.begin(),a.end(),greater<int>()
#define PRALL(a) a.begin(),a.end(),greater<pair<int,int>>()
#define ROT(a) a.begin(),a.begin()+1,a.end()
#define RROT(a) a.begin(),a.end()-1,a.end()
#define PB push_back
#define MP make_pair
#define PI acos(-1.0)
//printf("myco\n");//for debug
/*--------------------------------------------*/
int main(){
    int n,x;cin>>n>>x;
    V l(n);rep(i,n)cin>>l[i];
    int ans=1;
    int now=0;
    rep(i,n){
        now+=l[i];
        if(now>x)break;
        ans++;
    }
    cout<<ans<<endl;
}


Measured memory_bytes: 256
n,q=map(int,input().split())
s=list(input())
ac=[0]*n
for i in range(1,n):
  ac[i]=ac[i-1]
  if s[i-1]+s[i]=='AC':
    ac[i]+=1
#print(*ac)
for _ in range(q):
  l,r=map(int,input().split())
  print(ac[r-1]-ac[l-1])

Measured memory_bytes: 12284
#include<iostream>
#include<string>
#include<algorithm>
#include <cstdlib>
 
int main()
{
	int a, b, c, allchoco=0;
	int num[100],choco[100];
	std::cin >> a >> b >> c;
	for (int i = 0; i < a; i++){
		std::cin >> num[i];
		if (b%num[i] == 0) {
			choco[i] = b / num[i];
		}
		else {
			choco[i] = b / num[i] + 1;
		}
}
	for (int i = 0; i < a; i++) {
		allchoco += choco[i];
	}
	std::cout << allchoco + c<<std::endl;

}



Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
 
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define endl "\n"
#define int long long
#define double long double

const int N=1e5+5;

int n;
double x[N];
string u[N];

int32_t main()
{
	IOS;
	cin>>n;
	double ans=0;
	for(int i=1;i<=n;i++)
	{
		cin>>x[i]>>u[i];
		if(u[i]=="JPY")
			ans+=x[i];
		else
			ans+=x[i] * 380000.0;
	}
	cout<<fixed<<setprecision(12)<<ans;
	return 0;
}


Measured memory_bytes: 1024
import sys
sys.setrecursionlimit(10**8)
def ii(): return int(sys.stdin.readline())
def mi(): return map(int, sys.stdin.readline().split())
def li(): return list(map(int, sys.stdin.readline().split()))
def li2(N): return [list(map(int, sys.stdin.readline().split())) for _ in range(N)]
def dp2(ini, i, j): return [[ini]*i for _ in range(j)]
def dp3(ini, i, j, k): return [[[ini]*i for _ in range(j)] for _ in range(k)]
import bisect #bisect.bisect_left(B, a)
#from collections import defaultdict #d = defaultdict(int) d[key] += value
import itertools #list(accumulate(A))
from collections import deque

N = ii()
ele = [3, 5, 7]
l = []

def dfs(num, flag3, flag5, flag7):
    #print(num, flag3, flag5, flag7)
    if num > N:
        return 
    if flag3 is flag5 is flag7 is True:
        l.append(num)
    num *= 10
    dfs(num+3, True, flag5, flag7)
    dfs(num+5, flag3, True, flag7)
    dfs(num+7, flag3, flag5, True)

dfs(0, False, False, False)
print(len(l))


Measured memory_bytes: 4332
//*******Abhijit Burman***********//
//Jalpaiguri Government Engineering College//

// Taken From Striver_79
// Never open a ranklist untill and unless you are done with solving problems, wastes 3/4 minuts 
// Donot treat CP as a placement thing, love it and enjoy it, you will succeed for sure. 


#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define pb push_back
#define ff first
#define ss second
#define mk make_pair
#define MAXX (1000000000000000000+7)
#define mod 1000000007
#define endl "\n"
#define fio ios_base::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL)
#define sortv(v) sort(v.begin(),v.end())
void printv(vector<ll> v) { ll sz = v.size(); for(ll i=0;i<sz;i++) {if (i == sz - 1) cout << v[i] << "\n"; else cout << v[i] << " ";}}
void input(ll a[], ll sz) {for(ll i=0;i<sz;i++) cin >> a[i];}
void print(ll a[], ll sz) {for(ll i=0;i<sz;i++) {if (i == sz - 1) cout << a[i] << "\n"; else cout << a[i] << " ";}}
ll dx1[] = {1, 1, 0, -1, -1, -1, 0, 1};
ll dy1[] = {0, 1, 1, 1, 0, -1, -1, -1};

ll dx2[] = {1, 0, -1, 0};
ll dy2[] = {0, 1, 0, -1};

ll mul(ll a, ll b, ll p = mod) {return ((a % p) * (b % p)) % p;}
ll add(ll a, ll b, ll p = mod) {return (a % p + b % p) % p;}
ll power(ll x,ll y,ll p = mod) 
{ 
    ll res = 1;
    x = x % p;
    while (y > 0) 
    {
        if (y & 1) 
            res = (res*x) % p;
        y = y>>1; // y = y/2 
        x = (x*x) % p; 
    } 
    return res; 
} 
ll modInverse(ll n, ll p = mod)
{
    return power(n, p - 2, p);
}
ll ncrMod(ll n, ll r, ll p = mod)
{
    if (r == 0)
        return 1;
    ll fac[n + 1];
    fac[0] = 1;
    for (ll i = 1 ; i <= n; i++)
        fac[i] = fac[i - 1] * i % p;
    return (fac[n] * modInverse(fac[r], p) % p *
            modInverse(fac[n - r], p) % p) % p;
}
// a+b=xor(a,b)+2*(a&b)//

bool isPrime(ll n){
    for(int i=2;i*i<=n;i++){
        if(n%i==0){
            return false;
        }
    }
    return true;
}
bool cmp(pair<ll,ll>&a, pair<ll,ll>&b){
    if(a.ff==b.ff){
        return (a.ss<b.ss);
    }
    else{
        return (a.ff>b.ff);
    }
}
 
void solve()
{
    ll n;
    cin>>n;
    ll x,y;
    ll cnt=0,maxi=0;
    for(int i=0;i<n;i++){
        cin>>x>>y;
        if(x==y){
            cnt++;
        }
        else{
            maxi=max(maxi,cnt);
            cnt=0;
        }
    }
    maxi=max(maxi,cnt);
    cout<<(maxi>=3?"Yes":"No")<<endl;
}


int main()
{
	fio;
// 	#ifndef ONLINE_JUDGE
//     // for getting input from input.txt
//     freopen("input.txt", "r", stdin);
//     // for writing output to output.txt
//     freopen("output.txt", "w", stdout);
// 	#endif
 
    
	ll t=1;
// 	cin>>t;
	while(t--)
	{
		solve();
	}
	return 0;
}

Measured memory_bytes: 3628
#include <queue>
#include <vector>
#include <cstdio>
#include <algorithm>

int v,e,in[10005];
std::queue<int> q;
std::vector<int> g[10005];

int main()
{
    scanf("%d%d",&v,&e);
    while(e--)
    {
        int x,y;
        scanf("%d%d",&x,&y);
        g[x].push_back(y);
        in[y]++;
    }
    for(int i=0;i<v;i++)
        if(!in[i])
            q.push(i);
    while(!q.empty())
    {
        int now=q.front();
        q.pop();
        printf("%d\n",now);
        for(std::vector<int>::iterator it=g[now].begin();it!=g[now].end();it++)
            if(!--in[*it])
                q.push(*it);
    }
    return 0;
}


Measured memory_bytes: 3196
// luogu-judger-enable-o2
#include<bits/stdc++.h>
using namespace std;
typedef long long LL;
const int maxn=1e5+5;
int n,m;
int x[maxn];
int a[maxn],b[maxn],c[maxn];
LL K;
int main(){
	scanf("%d",&n);
	for (int i=1;i<=n;i++) scanf("%d",&x[i]);
	for (int i=1;i<n;i++) a[i]=b[i]=i;
	scanf("%d%lld",&m,&K);
	for (int tmp,i=1;i<=m;i++){
		scanf("%d",&tmp);
		swap(a[tmp-1],a[tmp]);
	}
	for (;K;K>>=1){
		if (K&1) for (int i=1;i<n;i++) b[i]=a[b[i]];
		for (int i=1;i<n;i++) c[i]=a[a[i]];
		for (int i=1;i<n;i++) a[i]=c[i];
	}
	LL ans=x[1];
	for (int i=1;i<=n;i++){
		printf("%lld.0\n",ans);
		ans+=x[b[i]+1]-x[b[i]];
	}
	return 0;
}

Measured memory_bytes: 3072
s = input()
lens = len(s)
l = 0
r = lens - 1
cnt = 0
while l != r:
  if s[l] == s[r]:
    l += 1
    r -= 1
    if l > r:
      break
  elif s[l] == 'x':
    cnt += 1
    l += 1
  elif s[r] == 'x':
    cnt += 1
    r -= 1
  else:
    print(-1)
    exit()
print(cnt)

Measured memory_bytes: 3316
import std.stdio, std.conv, std.functional, std.string;
import std.algorithm, std.array, std.container, std.range, std.typecons;
import std.numeric, std.math, std.random;
import core.bitop;

string FMT_F = "%.10f";

static string[] s_rd;
T RD(T = long)() { while(!s_rd.length) s_rd = readln.chomp.split; string res = s_rd[0]; s_rd.popFront; return res.to!T; }
string RDR()() { return readln.chomp; }
T[] ARR(T = long)(in string str, T fix = 0) { auto r = str.split.to!(T[]); r[] += fix; return r; }
size_t[] MAKE_IDX(alias less = "a < b", Range)(Range range) { auto idx = new size_t[](range.length); makeIndex!(less)(range, idx); return idx;}
size_t MIN_POS(alias less = "a < b", Range)(Range range) { auto r = minPos!(less)(range); return range.length - r.length; }

bool inside(T)(T x, T b, T e) { return x >= b && x < e; }
long lcm(long x, long y) { return x * y / gcd(x, y); }

long mod = 10^^9 + 7;
//long mod = 998244353;
//long mod = 1_000_003;
void moda(ref long x, long y) { x = (x + y) % mod; }
void mods(ref long x, long y) { x = ((x + mod) - (y % mod)) % mod; }
void modm(ref long x, long y) { x = (x * y) % mod; }

void main()
{
	auto n = RD;
	auto m = RD;

	writeln((n-1)*(m-1));
	stdout.flush();
	debug readln();
}

Measured memory_bytes: 256
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		long d = sc.nextLong();
		long[] x = new long[n];
		long[] y = new long[n];
		long count = 0;
		for(int i=0;i<n;i++){
			x[i] = sc.nextLong();
			y[i] = sc.nextLong();
			if(  ( x[i] * x[i] + y[i] * y[i] ) <= d * d ){
				count++;
			}
		}
		System.out.println(count);	
	}
}

Measured memory_bytes: 53060
/*
    RRR 3Day
    SRR  or RRS 2Day
    SSR or SRS or RSS 
    SSS
*/
#include <iostream>
#include <string>
using namespace std;
int main(){
    std::string weather;
    
    std::cin >> weather;
    
    bool oneDay = weather[0] == 'R';
    bool twoDay = weather[1] == 'R';
    bool treeDay = weather[2] == 'R';

    if(oneDay && twoDay && treeDay){
        std::cout << 3 << std::endl;
    } else if((oneDay && twoDay) || (twoDay && treeDay)){
        std::cout << 2 << std::endl;
    } else if(oneDay || twoDay || treeDay){
        std::cout << 1 << std::endl;
    } else {
        std::cout << 0 << std::endl;
    }

    return 0;
}

Measured memory_bytes: 3572
#include<bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
#define     ll          long long int
#define     ld          double
#define     REP(i,x,n)    for(ll i=x;i<n;i++)
#define     SZ(v)       (ll)v.size()
#define     endl        "\n"
#define     ff          first
#define     ss          second
#define     PQ_MIN      priority_queue <ll, vector<ll>, greater<ll> >
#define     PQ          priority_queue <int>
#define     pbds        tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>
#define     setbit(x)   __builtin_popcount(x)
#define     prec(n)     fixed<<setprecision(n)
#define     pb(n)       push_back(n)
#define     mp(a,b)     make_pair(a,b)
#define     clr(n)      memset(n,0,sizeof(n))
#define     reset(n)    memset(n,-1,sizeof(n))
#define     ii          pair<ll,ll>
#define     vll         vector<ll>
#define     PI          3.1415926535897932384626433832795028841971693993751

using namespace std;
using namespace __gnu_pbds;
bool comp(pair<ll,ll> a,pair<ll,ll> b) {       }
const ll MOD=1e9+7;
void print(vector<vector<ll> >&v)
{
    ll n=v.size();
    ll m=v[0].size();
    cout<<"\n";
    for(ll i=0;i<n;i++)
    {
        for(ll j=0;j<m;j++)
            cout<<v[i][j]<<" ";
        cout<<"\n";
    }
}
void print(vector<ll>&v)
{
    ll n=v.size();
    cout<<"\n";
    for(ll i=0;i<n;i++)
    {
            cout<<v[i]<<" ";
    }
        cout<<"\n";

}
void print(set<ll>&s)
{

cout<<endl;

set<ll>::iterator it;
for(it=s.begin();it!=s.end();it++)
    cout<<*it<<" ";
cout<<endl;
}
ll __lcm(ll a,ll b)
{
    return ((a*b)/__gcd(a,b));
}
ll power(ll a,ll p)
{
    ll res=1;
    while(p>0)
    {
        if(p&1){
            res=(res*a)%MOD;
            p--;
        }
            a=(a*a)%MOD;
            p/=2;
    }

    return res%MOD;
}
const ll INF=1e16;
const ll nxm=2e5+5;

ll spf[nxm];
void sieve()
{
    memset(spf,-1,sizeof(spf));

    spf[0]=spf[1]=1;

    for(ll i=2;i<nxm;i++)
    {
        if(spf[i]==-1)
            spf[i]=i;
        for(ll j=i*i;j<nxm;j+=i)
        {
            if(spf[j]==-1)
                spf[j]=i;

        }

    }
//    while(x>1)
//    {
//        ll s=spf[x];
//        temp[s]++;
//        x/=s;
//    }


// log n prime factor
}
void solve(){

ll x,n,t;

cin>>n>>x>>t;

cout<<(ll)ceil((double)n/x)*t<<endl;





















}
int main(){
//    freopen("timber_input", "r", stdin);
//    freopen("output.txt", "w", stdout);
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	ll t=1;
//	cin>>t;
    REP(i,1,t+1)
    {
//    cout<<"Case #"<<i<<": ";
		solve();
    }
	return 0;
}
//  bitset<64>(x).to_ullong() // in my com  _ulong()
//  cout<<bitset<64>(ans).to_string().substr(64-m)<<endl;
/*

const int INF = 0x3f3f3f3f;


char s[100];

fgets(s,100,stdin);

stringstream stram(s);

string abc;

bool ok1=0,ok2=0;

while(stram>>abc)

ternary operator for(int i=0;i<23;i++) or while(r-l>eps)


*/


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

void solve(long N){
  long X = ceil((float)N / 1.08);
  if (floor(1.08 * X) != N)
    cout << ":(" << endl;
  else
    cout << X << endl;
}

// Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
int main(){
  long N;
  cin >> N;
  solve(N);
  return 0;
}


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

typedef long long int ll;
typedef long double ld;
typedef pair<ll,ll> pll;
#define endl "\n";
#define fast ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)

ll const inf = 1e18;
ll const maxn = 1e6+5;
ll const mod = 1e9+7;

// code begins here

int main(){
    fast;

    ll n;
    cin>>n;
    
    string s;
    map<string, ll> mp;
    
    for(ll i=0;i<n;i++){
        cin>>s;
        mp[s]++;
    }
    
    cout<<"AC x "<<mp["AC"]<<endl;
    cout<<"WA x "<<mp["WA"]<<endl;
    cout<<"TLE x "<<mp["TLE"]<<endl;
    cout<<"RE x "<<mp["RE"]<<endl;

    return 0;
}


Measured memory_bytes: 3664
#include <bits/stdc++.h>
using namespace std;
#define _GLIBCXX_DEBUG
#define rep(i, from, to) for (int i = from; i < (to); ++i)
#define mp(x,y) make_pair(x,y)
#define all(x) (x).begin(),(x).end()
#define sz(x) (int)(x).size()
#define pb push_back
using ll = long long;
using vin=vector<int>;
using vll=vector<ll>;
using vst=vector<string>;
using P = pair<ll,ll>;
const int inf=1e9+7;
const ll INF=9e18;
template <typename T> bool chmin(T &a, const T& b){if(a > b){a = b;return true;}return false;}
template <typename T> bool chmax(T &a, const T& b){if(a < b){a = b;return true;}return false;}
template<class T> inline void Yes(T condition){ if(condition) cout << "Yes" << endl; else cout << "No" << endl; }
template<class T> inline void YES(T condition){ if(condition) cout << "YES" << endl; else cout << "NO" << endl; }
const int dx[4] = { 1, 0, -1, 0 };
const int dy[4] = { 0, 1, 0, -1 };

int main(){cout<<fixed<<setprecision(20);
		   int x;
           cin>>x;
           int a=x/100;
           int b=x%100;
           if(a*5>=b){
            cout<<1<<endl; 
           }
           else cout<<0<<endl;
}

Measured memory_bytes: 3524
#include<cstdio>
#include<algorithm>
int g[101][101],a[1000],b[1000],c[1000];
int const infty=10000000;
int main(){
  int n,m,answer=0;
  scanf("%d%d",&n,&m);
  for(int i=1;i<=n;i++){
    for(int j=1;j<=n;j++){
      g[i][j]=infty;
    }
    g[i][i]=0;
  }
  for(int i=0;i<m;i++){
    scanf("%d%d%d",&a[i],&b[i],&c[i]);
    g[a[i]][b[i]]=g[b[i]][a[i]]=c[i];
  }
  for(int k=1;k<=n;k++){
    for(int i=1;i<=n;i++){
      for(int j=1;j<=n;j++){
        g[i][j]=std::min(g[i][k]+g[k][j],g[i][j]);
      }
    }
  }
  for(int i=0;i<m;i++){
    bool use=false;
    for(int j=1;j<=n;j++){
      if(g[a[i]][j]==c[i]+g[b[i]][j])use=true;
    }
    if(!use)answer++;
  }
  printf("%d",answer);
  return 0;
}

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

int main() {
  int a1 , a2 ,a3 ,ans;
  cin >> a1 >> a2 >> a3;
  ans = a1+ a2 + a3;
  
  string bust, win;
  if(22 <= ans){
    cout << "bust" << endl;
  }
  if(21 >= ans){
    cout << "win" << endl;
  }
  
  return 0;
}

Measured memory_bytes: 256
import math

def sieve(n):
    ass = []
    is_prime = [True]*(n+1)
    is_prime[0] = False
    is_prime[1] = False

    for i in range(2, int(math.sqrt(n))+1):
        if not is_prime[i]:
            continue
        for j in range(i*2, n+1, i):
            is_prime[j] = False
    for i in range(n+1):
        if is_prime[i]:
            ass.append(i)
    return(ass)

x = int(input())
ass = sieve(10**5+4)
s = set(ass)
import bisect
if x in s:
    print(x)
else:
    i = bisect.bisect_right(ass, x)
    print(ass[i])

Measured memory_bytes: 4148
#include <iostream>
#include <algorithm>
#include <vector>
#include <map>
// #include <numeric> // gcdとかlcmとか C++17から
#include <time.h> // time_t timer; time(&timer); でtimerに現在時刻が代入される．
#include <unistd.h> // sleep関数．引数は秒単位．
using namespace std;

typedef long long ll;


// sortの仕方
// 	■ string s の場合
// 	昇順: sort(s.begin(), s.end())
// 	降順: sort(s.rbegin(), s.rend())
//
// 	■ ll a[N] の場合
// 	昇順: sort(a, a+N)
// 	降順: 不明

// vector の使い方
// 宣言：
// vector<int> v;
// vector<int> v(N);
// 初期化:
// vector<int> v(10, 5); 要素数10，全ての要素の値5．
// vector<int> v = {1, 2, 3};
// 代入：
// v[0] = 3;
// sort:
// sort(v.begin(), v.end());
//

// int alph2int(char character) {
//     int x = character - 'a';
//     return x;
// }

ll my_gcd(ll a, ll b){
	return (b==0) ? a : my_gcd(b, a%b);
}

ll my_lcm(ll a, ll b){
	return a*b / my_gcd(a,b);
}

ll factorial(ll a){
	ll ans = 1;
	for(ll i=a; i>0; i--){
		ans *= i;
	}
	return ans;
}

int main(int argc, char *argv[]){
	string S;
	cin >> S;

	int ans = 999;
	for (int i=0; i<(int)S.length()-2; i++) {
		int a = (int)S[i] - 48;
		int b = (int)S[i+1] - 48;
		int c = (int)S[i+2] - 48;
		int sum = a*100 + b*10 + c;
		int ans_tmp = abs(sum - 753);
		if (ans_tmp < ans) {
			ans = ans_tmp;
		}
	}

	cout << ans << endl;
}


Measured memory_bytes: 256
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
int n,m;
int cnt[30];
void work(){
	memset(cnt,0,sizeof(cnt));
	scanf("%d%d",&n,&m);
  int N=n*m;
  char ch;
  for(int i=1;i<=N;++i){
    while(ch=getchar(),ch>'z'||ch<'a');
    cnt[ch-'a']++;
  }
  if(n%2==0&&m%2==0){
    bool flag=true;
    for(int i=0;i<26;++i)if(cnt[i]%4!=0)flag=false;
    printf("%s\n",flag?"Yes":"No");
  }else if(n%2==0||m%2==0){
    if(m%2==0)swap(n,m);
    //n even m odd
    //    4*((m-1)*n/4),2*(n/2)
    bool flag=true;
    for(int i=0;i<26;++i){
      if(cnt[i]&1)flag=false;
    }
    //    2*((m-1)*n/4),1*(n/2)
    for(int i=0;i<26;++i)cnt[i]/=2;
    int cnt2=0,cnt1=0;
    for(int i=0;i<26;++i)cnt2+=cnt[i]/2,cnt1+=cnt[i]&1;
    if(cnt1>n/2)flag=false;
    printf("%s\n",flag?"Yes":"No");
  }else{
    //n odd m odd
    // 4*[(n-1)*(m-1)/4] 2*[(n-1)/2 +(m-1)/2] 1*1
    int cnt1=0;
    for(int i=0;i<26;++i){
      if(cnt[i]&1)cnt1++;
    }
    bool flag=true;
    if(cnt1!=1){
      flag=false;
    }else{
      for(int i=0;i<26;++i){
				cnt[i]/=2;
      }//2*[(n-1)*(m-1)/4] 1*[(n-1)/2 +(m-1)/2]
      cnt1=0;
      for(int i=0;i<26;++i){
				if(cnt[i]&1)cnt1++;
      }
      if(cnt1>(n-1)/2+(m-1)/2/*||((cnt1&1)!=(((n-1)/2 +(m-1)/2)&1))*/)flag=false;
    }
    printf("%s\n",flag?"Yes":"No");
  }
}
int main(){
  	work();
  return 0;
}

Measured memory_bytes: 128
import java.util.Scanner;

public class Main {
	Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
		Main main = new Main();
		main.solve();
	}

	void solve() {
		int n = nextInt();
		long[]a = new long[n];

		for(int i=0;i<n;i++)a[i]=nextLong();
		int less_zero=0;
		long min = 1L<<60;
		long sum = 0;
		for (int i=0;i<n;i++) {
	        if (a[i]<0)less_zero++;
	        min=min(min, abs(a[i]));
	        sum += abs(a[i]);
	    }
	    if (less_zero%2==0) println(sum);
	    else println(sum-(min*2));
	}

	private void println(Object s) {
		System.out.println(s);
	}

	private int nextInt() {
		return Integer.parseInt(sc.next());
	}
	private long nextLong() {
		return Long.parseLong(sc.next());
	}
	private String next() {
		return sc.next();
	}
	private long abs(long a) {
		return Math.abs(a);
	}
	private long min(long a,long b) {
		return Math.min(a,b);
	}
}

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

const string YES = "YES";
const string NO = "NO";

void solve(long long A, long long B, long long X)
{
    cout << (((A <= X) && (X <= A + B)) ? YES : NO) << endl;
}

// Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
int main()
{
    long long A;
    scanf("%lld", &A);
    long long B;
    scanf("%lld", &B);
    long long X;
    scanf("%lld", &X);
    solve(A, B, X);
    return 0;
}


Measured memory_bytes: 256
N = int(input())
A = list(map(int, input().split()))

total = abs(A[0]) + abs(A[-1])
for i in range(N-1):
  total += abs(A[i]-A[i+1])
  
ans = total-abs(A[0])-abs(A[0]-A[1])+abs(A[1])
print(ans)
for i in range(N-2):
  ans = total-abs(A[i]-A[i+1])-abs(A[i+1]-A[i+2])+abs(A[i]-A[i+2])
  print(ans)
ans = total-abs(A[-1])-abs(A[-1]-A[-2])+abs(A[-2])
print(ans)

Measured memory_bytes: 20584
#include <stdio.h>
 
int main(){
    int n,i,out,point,rui1,rui2,rui3;
    char c[8];
    scanf("%d",&n);
    for(i=0; i<n; i++){
        out=0;
        point=0;
        rui1=0;
        rui2=0;
        rui3=0;
        while(out!=3){
            scanf(" %s",c);
            switch(c[1]){
            case 'U':
                out++;
                break;
            case 'O':
                if(rui1==1){
                    point++;
                    rui1=0;
                }
                if(rui2==1){
                    point++;
                    rui2=0;
                }
                if(rui3==1){
                    point++;
                    rui3=0;
                }
                point++;
                break;  
            case 'I':
                if(rui3==1){
                    rui3=0;
                    point++;
                }
                if(rui2==1){
                    rui2=0;
                    rui3=1;
                }
                if(rui1==1){
                    rui2=1;
                    rui1=0;
                }
                rui1=1;
                break;
            }
        }
        printf("%d\n",point);
    }
    return 0;
	
	
}

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

#define FOR(i, a, b) for(int i=(a); i<(b); i++)
#define RFOR(i, a, b) for(int i=(a); i>=(b); i--)
#define rep(i, n) FOR(i, 0, n)
#define rrep(i, n) RFOR(i, n, 0)
#define dump(x)  cout << #x << " = " << (x) << endl;

typedef long long ll;
typedef pair<int, int> ii;
const int mod = 1e9+7;
const ll INF = 1e18;
const int inf = 1e9;

void solve()
{
  int x,a; cin>>x>>a;
  if (x<a) cout << 0 << endl;
  else cout << 10 << endl;
}

int main()
{
  solve();
  return 0;
}


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

#define rep(i,n) for(int i=0;i<(n);i++)
#define dbg(S) { int f=1; for(auto x:S) cerr<<(f?"[":", ")<<x, f=0; cerr<<"]\n"; }

using namespace std;
using lint=long long;

int main(){
	lint n,k; scanf("%lld%lld",&n,&k);
	vector<lint> a(n),b(n);
	rep(i,n) scanf("%lld",&a[i]);
	rep(i,n) scanf("%lld",&b[i]);

	sort(a.begin(),a.end());
	sort(b.rbegin(),b.rend());

	if(accumulate(a.begin(),a.end(),0LL)<=k){
		cout<<0<<endl;
		return 0;
	}

	lint lo=0,hi=1e14;
	while(hi-lo>1){
		lint mi=(lo+hi)/2;
		lint cost=0;
		rep(i,n){
			cost+=max(a[i]-mi/b[i],0LL);
		}
		if(cost<=k) hi=mi;
		else        lo=mi;
	}
	cout<<hi<<endl;

	return 0;
}


Measured memory_bytes: 3328
# -*- coding: utf-8 -*-

def main():
     n = int(input())

     ans = list()
     for i in range(n):
          ans = solve(ans)
     
     print('\n'.join(ans))

def solve(l):
     ret = list()
     if len(l) == 0:
          return ['a']

     for i in l:
          num = len(set(i))
          for n in range(num + 1):
               s = i + chr(ord('a') + n)
               ret.append(s)
     
     return ret

if __name__ == "__main__":
    main()


# 1: a
# 2: aa, ab
# 3: aaa, aab, aba, abb, abc

# 1:
# 2: 1と同じ、1と違う
# 3: 1と同じ、1と違う 1と同じ、2と同じ、1、2と違う


Measured memory_bytes: 15364
//04
#include<iostream>

using namespace std;

int main(){
  static bool cmp[1000000]={true,true};
  for(int i=2;i<1000000;i++){
    if(!cmp[i]){
      for(int j=2;j*i<1000000;j++){
	cmp[i*j]=true;
      }
    }
  }
  for(int a,d,n;cin>>a>>d>>n,a|d|n;){
    int c=0,i;
    for(i=a;c+=!cmp[i],c<n;i+=d);
    cout<<i<<endl;
  }
  return 0;
}

      

Measured memory_bytes: 0
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define db double
template<class T> void chmin(T& x, T y){if(x > y) x = y;}
template<class T> void chmax(T& x, T y){if(x < y) x = y;}

string S;
int ans[100010];
int main(){
    cin >> S;
    int N = S.size();
    S += 'R';
    vector<int> press;
    int cnt = 0;
    for(int i = 0; i < N; i++){
        cnt++;
        if(S[i] != S[i + 1]){
            press.push_back(cnt);
            cnt = 0;
        }
    }
    int idx = -1;
    for(int i = 0; i < press.size(); i++){
        if(i % 2 == 0){
            idx += press[i];
            ans[idx] += (press[i] + 1) / 2;
            ans[idx + 1] += press[i] / 2;
        }else{
            ans[idx] += press[i] / 2;
            ans[idx + 1] += (press[i] + 1) / 2;
            idx += press[i];
        }
    }
    for(int i = 0; i < N; i++) cout << ans[i] << " ";
    cout << endl;
    return 0; 
}

Measured memory_bytes: 1528
#include <iostream>
#include <numeric>
#include<cmath>
#include <map>

using ll = long long;

constexpr int MOD = 1e9+7;
ll powof2(int r)
{
    ll a = 1;
    while (r--)
    {
        a = (a << 1) % MOD;
    }
    return a;
}


int main()
{
    int N;
    std::cin >> N;

    int nop_count = 0;
    std::map<std::pair<ll,ll>,int> g;
    for (int i = 0; i < N; i++)
    {
        ll a, b;
        std::cin >> a >> b;

        if (a == 0 && b == 0)
        {
            ++nop_count;
            continue;
        }

        ll l;
        if (a == 0)
            l = std::abs(b);
        else if (b == 0)
            l = std::abs(a);
        else
            l = std::gcd(a, b);

        a /= l;
        b /= l;
        
        if (a < 0 || (a == 0 && b < 0))
        {
            a = -a;
            b = -b;
        }
        
        g[{a, b}]++;
    }

    ll ans = 1;
    for (auto p : g)
    {
        if (auto it = g.find({p.first.second, -p.first.first}); it != g.end() && p.first.second > 0)
        {
            ll mm = (powof2(p.second) + powof2(it->second) + MOD - 1) % MOD;
            ans = (ans * mm) % MOD;
        }
        else if (auto it = g.find({-p.first.second, p.first.first}); it != g.end())
        {
            // skip
        }
        else
        {
            ll mm = powof2(p.second);
            ans = (ans * mm) % MOD;
        }
    }
    ans = (ans + nop_count + MOD - 1) % MOD;

    std::cout << ans << std::endl;
}


Measured memory_bytes: 15956
#include <iostream>
#include <cassert>

using namespace std;
#define MAX 1000000
#define MOD 1000000007
#define ll long long
int X, Y,ans;

long long fac[MAX], finv[MAX], inv[MAX];


int fact(int n)
{
	if (n <= 1)
		return 1;
	else return n * fact(n - 1);
}

void COMinit() {
	fac[0] = fac[1] = 1;
	finv[0] = finv[1] = 1;
	inv[1] = 1;
	for (int i = 2; i < MAX; 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;
	}
}


long long COM(int n, int k) {
	if (n < k) return 0;
	if (n < 0 || k < 0) return 0;
	return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}

int main()
{
	cin >> X >> Y;
	COMinit();
	if ((X + Y) % 3 == 0 and (2 * Y - X) >= 0 and (2 * Y - X) % 3 == 0 and (2 * X - Y) >= 0 and (2 * X - Y) % 3 == 0)
	{
		ans = COM((X + Y) / 3, (2 * X - Y) / 3);
	}
	else
	{
		ans = 0;
	}
	cout << ans;
}



Measured memory_bytes: 23680
#include <stdio.h>
#include <stdlib.h>

int main(void) {
  int N, *t, *x, *y;
  scanf("%d", &N);
  t = (int*)malloc(sizeof(int*) * (N+1));
  x = (int*)malloc(sizeof(int*) * (N+1));
  y = (int*)malloc(sizeof(int*) * (N+1));
  t[0] = x[0] = y[0] = 0;
  for (register int i = 1; i <= N; i++) {
    scanf("%d %d %d", &t[i], &x[i], &y[i]);
  }

  for (register int i = 1; i <= N; i++) {
    int diff = abs(t[i] - t[i-1]) - abs(x[i] - x[i-1]) - abs(y[i] - y[i-1]);
    if (diff < 0 || diff % 2 != 0) {
      printf("No\n");
      return 0;
    }
  }
  printf("Yes\n");
  return 0;
}


Measured memory_bytes: 1280
//  Friendly NUKE is ready!!
#include <bits/stdc++.h>
#define SPEED ios::sync_with_stdio(false); cin.tie(0)
#define loop(i,a,b) for(int i=a;i<b;i++)
#define ll long long
#define vi vector<int>
#define vl vector<ll>
#define pii pair<int,int>
#define pll pair<long long int,long long int>
#define dbg(x) cout<<#x<<": "<<x<<endl
#define ff first
#define ss second
#define mp make_pair
#define pb push_back
#define mo 1000000007
#define inf 1e18
#define eps 0.0000000001
#define stp setprecision(20)
#define all(v) v.begin(),v.end()
#define endl '\n'
using namespace std;
//mt19937 rng32(chrono::steady_clock::now().time_since_epoch().count());
 
#define N  int(2e5)+10
ll h[N] , dp[N] ;
int main()
{    SPEED;
      int n,k;
      cin>>n>>k;
      loop(i,1,n+1)cin>>h[i] ,dp[i]=inf;
      dp[1] =0;
      loop(i,2,n+1){
      	loop(j,1,k+1)
      	if(i-j>=1)
      	 dp[i] = min(dp[i-j]+abs(h[i]-h[i-j]),dp[i]);
      }      
      cout<<dp[n] ;
}

Measured memory_bytes: 5180
#include <iostream>
#include <stdio.h>
#include <fstream>
#include <algorithm>
#include <string>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <vector>
#include <limits.h>
#include <math.h>
#include <functional>
#include <bitset>
#include <iomanip>

#define repeat(i,n) for (long long i = 0; (i) < (n); ++ (i))
#define debug(x) cerr << #x << ": " << x << '\n'
#define debugArray(x,n) for(long long i = 0; (i) < (n); ++ (i)) cerr << #x << "[" << i << "]: " << x[i] << '\n'
#define debugArrayP(x,n) for(long long i = 0; (i) < (n); ++ (i)) cerr << #x << "[" << i << "]: " << x[i].first<< " " << x[i].second << '\n'

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> Pii;
typedef vector<int> vint;
typedef vector<ll> vll;
const ll INF = INT_MAX;
const ll MOD = 1e9+7;


ll gcd(ll x,ll y){
  return y==0? x:gcd(y,x%y);
}

int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  int H,W;cin>>H>>W;
  repeat(j,W+2)cout<<"#";
  cout<<endl;
  repeat(i,H){
    string a;cin>>a;
    cout << "#";
    repeat(j,W)cout << a[j];
    cout << "#"<<endl;
  }
  repeat(j,W+2)cout<<"#";
  cout<<endl;
  return 0;
}


Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N=1e3+5,M=2e4+5,inf=0x3f3f3f3f,mod=1e9+7;
#define mst(a,b) memset(a,b,sizeof a)
#define lx x<<1
#define rx x<<1|1
#define reg register
#define PII pair<int,int>
#define fi first
#define se second
#define pb push_back
#define il inline
int main(){
	int n;
	scanf("%d",&n);
	ll s=0;
	for(int i=1;i<=n;i++){
		if(n%i==0) s+=n/i-1;
		else s+=n/i;
	}
	printf("%lld\n",s);
	return 0;
}

Measured memory_bytes: 3844
#include <bits/stdc++.h>
using namespace std;
using ll=long long;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define inf 1001001001001001001
#define mod 1000000007
#define mod2 998244353
#define pi acos(-1)
#define all(v) v.begin(),v.end()
int main(){
    int a,b,c;cin>>a>>b>>c;
    if(a==c)cout<<b;
    else if(b==c) cout<<a;
    else cout<<c;
    cout<<endl;
}


Measured memory_bytes: 3604
#include <cstring>
#include <iostream>
using namespace std;
int main() {
    string s, t; cin >> s >> t;
    int nxt[100100][26];
    memset(nxt, -1, sizeof(nxt));
    for (int i = s.size() - 1; i >= 0; i--) {
        if (i < s.size() - 1)
            for (int j = 0; j < 26; j++) nxt[i][j] = nxt[i+1][j];
        nxt[i][s[i]-'a'] = i;
    }
    for (int i = s.size() - 1; i >= 0; i--) {
        for (int j = 0; j < 26; j++)
            if (nxt[i][j] < 0) nxt[i][j] = nxt[0][j];
    }
    long long ans = 0;
    for (char c : t) {
        int pos = nxt[ans%s.size()][c-'a'];
        if (pos < 0) { cout << "-1\n"; return 0; }
        else if (pos >= ans%s.size()) ans += (pos - ans%s.size()) + 1;
        else ans += (pos - ans%s.size() + s.size()) + 1;
    }
    cout << ans << endl;
}


Measured memory_bytes: 10752
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
ll n,k;
int main()
{
    scanf("%lld%lld",&n,&k);
    if(2*k<=n+1)
    {
        k--;
        for(int i=1;i<=n/2+n%2;i++)
            printf("%lld %lld %lld\n",k+n-(i-1)*2,k+n+n/2+i,k+3*n-i+1);
        for(int i=1;i<=n/2;i++)
            printf("%lld %lld %lld\n",k+n-1-(i-1)*2,k+n+i,k+2*n+n/2-i+1);
    }
    else printf("-1\n");
}


Measured memory_bytes: 2304
import Control.Applicative
import Control.Monad
import Control.Monad.ST
-- import qualified Data.ByteString as BS
import Data.Functor
import Data.Function
import Data.Monoid
import Data.Maybe
import Data.List
import qualified Data.Foldable as Foldable
import qualified Data.Set as Set
--import qualified Data.Sequence as Sequence
import Data.List.Split
import Data.Bits
import Data.Char
import Data.Ix
import Data.Ratio
import Data.Ord
import Data.Fixed
import Data.Tuple
--import Data.Array
import Data.Array.Unboxed
--import Data.Array.IArray
import Data.Array.MArray
import Data.Array.IO
import Data.Array.ST
import Data.IORef
import Data.STRef
import Text.Printf
-- import System.IO.Unsafe
 
-- templete
readInt = read :: String -> Int
readInteger = read :: String -> Integer
readDouble = read :: String -> Double
getInt = readLn :: IO Int
getInts = map readInt . words <$> getLine
getInteger = readLn :: IO Integer
getIntegers = map readInteger . words <$> getLine
getDouble = readLn :: IO Double
getDoubles = map readDouble . words <$> getLine
sjoin :: (Show a) => [a] -> String
sjoin = unwords . map show
tjoin :: (Show a, Show b) => (a, b) -> String
tjoin (x, y) = show x ++ (' ' : show y)
cond :: a -> a -> Bool -> a
cond t f c = if c then t else f
apply2 :: (a -> a -> b) -> [a] -> b
apply2 f [x,y] = f x y
apply3 :: (a -> a -> a -> b) -> [a] -> b
apply3 f [x,y,z] = f x y z
apply4 :: (a -> a -> a -> a -> b) -> [a] -> b
apply4 f [x,y,z,w] = f x y z w
fnTuple :: (a -> b, a -> c) -> a -> (b, c)
fnTuple (f,g) a = (f a, g a)
replace :: (Eq a) => a -> a -> [a] -> [a]
replace x y = map (\z -> if z==x then y else z)
binMap :: (a -> a -> b) -> [a] -> [b]
binMap f (x:xs@(y:_)) = f x y : binMap f xs
binMap _ _ = []
splitRec :: Int -> [a] -> [[a]]
splitRec _ [] = []
splitRec n xs = let (y,ys) = splitAt n xs in y : splitRec n ys
infixl 7 `divCeil`
divCeil :: Integral a => a -> a -> a
x `divCeil` y = (x+y-1) `div` y
coverC :: Ord a => (a, a) -> a -> Bool
coverC (l,r) x = l<=x && x<=r
coverH :: Ord a => (a, a) -> a -> Bool
coverH (l,r) x = l<=x && x<r
ibsearch :: (Int -> Bool) -> (Int,Int) -> Int
ibsearch f (ok,ng) = if abs (ok-ng) <= 1 then ok else let mid = (ok + ng) `div` 2 in ibsearch f (if f mid then (mid,ng) else (ok,mid))
whenM :: Monad m => m Bool -> m () -> m ()
whenM c a = c >>= flip when a
unconsU :: [a] -> (a, [a])
unconsU (x:xs) = (x, xs)
-- templete


main = map (apply2 (+) . map readInt . words) . lines <$> getContents >>= mapM_ print


Measured memory_bytes: 4092
n = int(input())
xu = []
ans = []
for i in range(n):
    XU = list(input().split())
    xu.append(XU)
for m, c in xu:
    if c == "JPY":
        ans.append(int(m))
    else:
        ans.append(float(m)*380000)
print(sum(ans))

Measured memory_bytes: 61420
# import math
# import sympy
# sympy.divisors(10**9)

n = int(input())

# count = 0
# for i in range(1, n):
#     count = count + math.ceil(len(sympy.divisors(i)))
#     # print(math.ceil(len(sympy.divisors(i))))
# print(count)

count = 0
for a in range(1, n - 1):
    if n % a != 0:
        b = n // a
    else:
        b = n // a - 1
    if a <= b:
        count = (count + b)
    else:
        count = (count + b)
    # print(count)

print(count + 1)

Measured memory_bytes: 9176
import java.io.*;
import java.util.*;

public class Main {
	
	static char[] alpha = "abcdefghij".toCharArray();
	
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		
		int k = scan.nextInt();
		
		Set<StringValue> pre = new LinkedHashSet<>();
		Set<StringValue> now;
		pre.add(new StringValue("a", 1));
		
		for(int i = 2;i <= k;i ++) {
			now = new LinkedHashSet<>();
			for(StringValue s : pre) {
				for(int n = 0;n < s.num;n ++) {
					now.add(new StringValue(s.str + alpha[n], s.num));
				}
				now.add(new StringValue(s.str + alpha[s.num], s.num + 1));
			}
			pre = now;
		}
		for(StringValue value : pre) {
			System.out.println(value.str);
		}
	}
}

class StringValue{
	
	 String str;
	 int num;
	 
	 public StringValue(String text, int num) {
		 this.str = text;
		 this.num = num;
	 }
}

Measured memory_bytes: 63060
#include <iostream>
#include <iomanip>
#include <string>
#include <cctype>
#include <algorithm>
#include <numeric>
#include <iterator>
#include <vector>
#include <map>
#include <set>
#include <regex>
#define _USE_MATH_DEFINES
#include <math.h>
using namespace std;

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

	int la = ceil(a * 100 / 8);
	int ua = floor((a + 1) * 100 / 8 - 0.001);
	int lb = b * 10;
	int ub = (b + 1) * 10 - 1;
	int lx = max(la, lb);
	int ux = min(ua, ub);
	if (lx <= ux) {
		cout << lx << endl;
	} else {
		cout << "-1" << endl;
	}

	return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define REP(i, n) FOR(i, 0, (n))
#define FOR(i, a, b) for(int i=(a); i<(b); i++)
#define LAR(a, b) ((a)=max((a),(b)))
#define SML(a, b) ((a)=min((a),(b)))
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<pair<int, int>> vpii;
typedef pair<int, int> pii;
#define PB push_back
#define EB emplace_back
#define MP make_pair
#define ALL(a) (a).begin(), (a).end()
#ifdef LOCAL_DEBUG
#define DEBUG(...) printf(__VA_ARGS__)
#else
#define DEBUG(...)
#endif

#define N 31234
int a[N][10] = {};
char s[N];
int b[10][10][10] = {};

int main(){
	int n; scanf("%d%s", &n, s);
	REP(i, n){
		REP(j, 10){
			int &cur = a[i+1][j];
			cur = a[i][j];
			if(s[i] == '0' + j) cur++;
		}
	}
	REP(i, n){
		int l = s[i] - '0';
		DEBUG("i=%d\n", i);
		REP(j, 10){
			REP(k, 10){
				if(a[0][j] != a[i][j] && a[i+1][k] != a[n][k]){
					DEBUG("%d%d%d\n", j, l, k);
					b[j][l][k] = 1;
				}
			}
		}
	}
	int ans = 0;
	REP(i, 10){
		REP(j, 10){
			REP(k, 10){
				if(b[i][j][k]) ans++;
			}
		}
	}
	printf("%d\n", ans);
}


Measured memory_bytes: 1408
#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int S, s1, s2, s3;
  cin >> S;
  s3 = S % 10;
  s2 = (S - s3) % 100 / 10;
  s1 = (S - s2 - s3) / 100;
  cout << s1 + s2 + s3 << endl;
}

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

int main () {

	for(int i=1;i<10;i++){
		for(int j=1;j<10;j++){
			printf("%dx%d=%d\n",i,j,i*j);
		}
	}
    return 0;
}

Measured memory_bytes: 3064
using System;
using System.Linq;

namespace paiza問題用
{
    class Program
    {
        static void Main(string[] args)
        {
            int N = int.Parse(Console.ReadLine());
            int[] a = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
            long output = 0;
            for (int i = 0; i < N; i++)
            {
                while (a[i] % 2 == 0)
                {
                    a[i] = a[i] / 2;
                    output++;
                }
            }
            Console.WriteLine(output);
        }
    }
}


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


int main() {
  // 水たまりを求める
  stack<int> S1;
  deque<tuple<int, int>> S2;

  string input;
  cin >> input;
  int total = 0;
  for (int i=0; i<input.size(); i++) {
    char s = input[i];

    if (s=='\\') S1.push(i);
    else if (s=='/' && S1.size()>0) {
      int ip = S1.top();
      S1.pop();
      int area_sum = i - ip;
      total += area_sum;
      while (S2.size()>0) {
        int j, area;
        tie(j, area) = S2.back();
        if (j > ip) {
          area_sum += area;
          S2.pop_back();
        } else break;
      }
      S2.push_back(make_tuple (i, area_sum));
    }
  }
  // print
  printf("%d\n", total);
  // stack
  int n = S2.size();
  printf("%d", n);
  for (int i=0; i<n; i++) {
    int area_i;
    tie(ignore, area_i) = S2.front();
    printf(" %d", area_i);
    S2.pop_front();
  }
  printf("\n");
}


Measured memory_bytes: 3348
#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, h, w; cin >> n >> h >> w;
  int cnt = 0;
  for (int i = 0; i < n; i++) {
    int x, y; cin >> x >> y;
    if (h <= x && w <= y) cnt++;
  }
  cout << cnt << endl;
  return 0;
}

Measured memory_bytes: 256
#include <algorithm>
#include <cstdio>
#define MOD 1000000007
struct data
{
	int x, y, idx;
} arr[200005], seq[200005];
int pre[200005];
int main()
{
	// freopen("AGC015-E.in", "r", stdin);
	int n;
	scanf("%d", &n);
	for (int i = 0; i < n; i++)
		scanf("%d%d", &arr[i].x, &arr[i].y);
	std::sort(arr, arr + n, [&] (const data &x, const data &y) { return x.y < y.y; });
	for (int i = 0; i < n; i++)
		arr[i].idx = i;
	std::sort(arr, arr + n, [&] (const data &x, const data &y) { return x.x < y.x; });
	int cur = n;
	for (int i = n - 1; i >= 0; i--)
	{
		cur = std::min(cur, arr[i].idx);
		seq[arr[i].idx].x = cur + 1;
	}
	cur = -1;
	for (int i = 0; i < n; i++)
	{
		cur = std::max(cur, arr[i].idx);
		seq[arr[i].idx].y = cur + 1;
	}
	std::sort(seq, seq + n, [&] (const data &x, const data &y)
	{
		if (x.y == y.y)
			return x.x < y.x;
		return x.y < y.y;
	});
	pre[0] = 1;
	for (int i = 0; i < n; i++)
	{
		for (int j = i ? seq[i - 1].y + 1 : 1; j <= seq[i].y; j++)
			pre[j] = pre[j - 1];
		int x = (pre[seq[i].y] - (seq[i].x >= 2 ? pre[seq[i].x - 2] : 0)) % MOD;
		(pre[seq[i].y] += x) %= MOD;
	}
	printf("%d\n", ((pre[n] - pre[n - 1]) % MOD + MOD) % MOD);
	return 0;
}


Measured memory_bytes: 5632
#include<bits/stdc++.h>
#define FOR(i,a,b)for(int i=(a),_b=(b);i<=_b;i++)
#define FORN(i,b,a)for(int i=(b);_a=(a);i>=_a;i--)
#define REP(i,n)for(int i=0,_n=n;i<n;i++)
#define ll long long
#define pii pair<int,int>
#define re return
#define vi vector<int>
#define pb push_back
#define si set<int>
#define in insert
#define fl float
#define db double
#define ld long double
#define X first
#define Y second
#define st string
#define ull unsigned long long
#define mod 1000000007
#define INF 1000000007
#define x1 XZVJDFADSPFOE
#define y1 GASDIJSLDAEJF
#define x2 DFDAJKVOHKWIW
#define y2 PSFSAODSXVNMQ
using namespace std;
inline void read(int &x)
{
	short negative=1;
    x=0;
    char c=getchar();
    while(c<'0' || c>'9')
    {
		if(c=='-')
			negative=-1;
		c=getchar();
	}
    while(c>='0' && c<='9')
        x=(x<<3)+(x<<1)+(c^48),c=getchar();
    x*=negative;
}
vector<int>v[100100];
vector<int>v1[100100];
int cmp[100100];
int group[100100];
int ans[100100];
void dfs(int i,int c)
{
	group[i]=c;
	cmp[c]++;
	REP(j,v[i].size())
	{
		if(!group[v[i][j]]){
			dfs(v[i][j],c);
		}
	}
}
int main()
{
	int n,m,k;
	int cnt=0;
	cin>>n>>m>>k;
	REP(i,m)
	{
		int a,b;
		cin>>a>>b;
		a--,b--;
		v[a].pb(b);
		v[b].pb(a);
	}
	REP(i,n)
	{
		if(!group[i])dfs(i,++cnt);
	}
	REP(i,n)
	{
		ans[i]=cmp[group[i]]-v[i].size()-1;
	}
	REP(i,k)
	{
		int a,b;
		cin>>a>>b;
		a--,b--;
		if(group[a]==group[b])
		{
			ans[a]--;
			ans[b]--;
		}
	}
	REP(i,n)
	{
		cout<<ans[i]<<" ";
	}
	return 0;
}



Measured memory_bytes: 10368
#include<stdio.h>
#include<stdlib.h>
#include<string>
#include<iostream>

using namespace std;

struct Node {
  int key;
  Node *right, *left, *parent;
};

Node *root, *NIL;

Node *find(Node *u, int k) {
  while(u != NIL && u->key != k) {
    if(k < u->key) u = u->left;
    else u = u->right;
  }
  return u;
}

void insert(int k) {
  Node *y = NIL;
  Node *x = root;
  Node *z;

  z = (Node *)malloc(sizeof(Node));
  z->key = k;
  z->left = NIL;
  z->right = NIL;

  while(x != NIL) {
    y = x;
    if(z->key < x->key) {
      x = x->left;
    } else {
      x = x->right;
    }
  }
  z->parent = y;

  if(y == NIL) {
    root = z;
  } else {
    if(z->key < y->key) {
      y->left = z;
    } else {
      y->right = z;
    }
  }
}

void inorder(Node *u) {
  if(u == NIL) return;
  inorder(u->left);
  printf(" %d", u->key);
  inorder(u->right);
}

void preorder(Node *u) {
  if(u == NIL) return;
  printf(" %d", u->key);
  preorder(u->left);
  preorder(u->right);
}

int main() {
  int n, i, x;
  string com;

  scanf("%d", &n);

  for(i = 0; i < n; i++) {
    cin>>com;
    if(com == "find") {
      scanf("%d", &x);
      Node *t = find(root, x);
      if(t != NIL) printf("yes\n");
      else printf("no\n");
    } else if (com == "insert") {
      scanf("%d", &x);
      insert(x);
    } else if(com == "print") {
      inorder(root);
      printf("\n");
      preorder(root);
      printf("\n");
    }
  }

  return 0;
}



Measured memory_bytes: 22052