akhauriyash/Code-Regression huggingface dataset:
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using static System.Console;
using static System.Math;

namespace Atcoder
{
    class Program
    {
        static StreamWriter sw = new StreamWriter(OpenStandardOutput()) { AutoFlush = false };
        static void Main(string[] args)
        {
            try
            {
                SetOut(sw);
                Solve.Answer();
                Out.Flush();
            }
            catch (Exception ex)
            {
                WriteLine(ex.ToString());
            }
        }
    }

    public class Solve
    {
        public static void Answer()
        {
            var n = IO.RInt;
            var a = new int[n];
            for (int i = 0; i < n; i++)
            {
                a[i] = IO.RInt;
            }
            var sum = a.Sum();
            if (sum % 10 != 0)
            {
                WriteLine(sum);
                return;
            }
            Array.Sort(a);
            var sub = 0;
            for (int i = 0; i < n; i++)
            {
                if (a[i] % 10 != 0)
                {
                    sub = a[i];
                    break;
                }
            }
            if (sub == 0)
            {
                WriteLine(0);
            }
            else
            {
                WriteLine(sum - sub);
            }
        }
    }

    public class IO
    {
        #region Input
        public static int RInt => int.Parse(ReadLine());
        public static long RLong => long.Parse(ReadLine());
        public static double RDouble => double.Parse(ReadLine());

        public static string[] RSString => ReadLine().Split();
        public static int[] RSInt => ReadLine().Split().Select(s => int.Parse(s)).ToArray();
        public static long[] RSLong => ReadLine().Split().Select(s => long.Parse(s)).ToArray();
        public static double[] RSDouble => ReadLine().Split().Select(s => double.Parse(s)).ToArray();
        #endregion

        #region Output
        public static void OutJoinSpace<T>(IEnumerable<T> list) => WriteLine(string.Join(" ", list));
        public static void WriteLineYes_or_No(bool flag) => WriteLine(flag ? "Yes" : "No");
        public static void WriteLineYES_or_NO(bool flag) => WriteLine(flag ? "YES" : "NO");
        #endregion
    }

    public class Mod
    {
        #region
        private readonly static long M = 1000000007;

        public static long Add(long a, long b) => (a * b) % M;
        public static long Sub(long a, long b) => (a - b) % M >= 0 ? (a - b) % M : (a - b) % M + M;
        public static long Multi(long a, long b) => (a * b) % M;
        #endregion
    }
}

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

int main(void){
  string S;
  cin >> S;
  int cnt = 0;
  int n = S.length();
  for(int i = 0; i < n /2 ; i++ ) {
    if(S[i] != S[n-1-i])  cnt++;
  }
  cout << cnt<< endl;
  return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
                     
#define int             long long
#define ld              long double
#define mp              make_pair
#define ff              first
#define ss              second
#define pb              push_back
#define fo(i,n)         for(i=0;i<n;i++)
#define fo1(i,n)        for(i=1;i<=n;i++)
#define FO(i,k,n)       for(i=k;k<=n?i<=n:i>=n;k<=n?i++:i--)
#define all(c)          c.begin(),c.end()
#define rall(c)         c.rbegin(),c.rend()
#define si              set<int>
#define vi              vector<int>
#define mii             map<int,int>
#define pii             pair<int,int>
#define vpii            vector<pii>
#define vvi             vector<vi>
#define usi             unordered_set<int>
#define umii            unordered_map<int,int>
#define pqmx            priority_queue<int>
#define pqmn            priority_queue<int,vi,greater<int> >
#define sp(x)           cout<<setprecision(x)<<fixed;
#define setbits(x)      __builtin_popcountll(x)
#define zerobits(x)     __builtin_ctzll(x)
#define in(a,n)         vi a(n);fo(i,n)cin>>a[i];
#define in1(a,n)        vi a(n+1);fo1(i,n)cin>>a[i];
#define w(t)            int t;cin>>t;while(t--)
#define sz(v)           (int)v.size()
#define gcd             __gcd
#define lcm(x,y)        x*(y/gcd(x,y))
#define endl            '\n'
#define PI              3.14159265358979323846
const int inf =         1e18;
const int mod =         1e9+7;
void __p(int x) {cout<<x;}
void __p(int32_t x){cout<<x;}
void __p(float x){cout<<x;}
void __p(double x){cout<<x;}
void __p(ld x) {cout<<x;}
void __p(char x){cout <<'\''<<x<<'\'';}
void __p(const char *x){cout <<'\"' <<x<<'\"';}
void __p(const string &x) {cout<<'\"'<<x<<'\"';}
void __p(bool x) {cout<<(x?"true":"false");}
void _p() {cout << "]\n";}
template<typename T,typename V>     void __p(const pair<T,V> &x) {cout<<'{';__p(x.first);cout<<',';__p(x.second);cout<<'}';}
template<typename T>                void __p(const T &x) {int f = 0; cout << '{'; for (auto &i: x) cout << (f++ ? "," : ""), __p(i); cout << "}";}
template <typename T,typename... V> void _p(T t, V... v) {__p(t);if(sizeof...(v))cout<<", ";_p(v...);}
int po(int x,int p,int m = inf) {int ans=1;x%=m;while(p>0){if(p&1)ans=(ans*x)%m;p=p>>1;x=(x*x)%m;}return ans;}
int inv(int x,int m=mod){return po(x,m-2,m)%m;}
#ifndef ONLINE_JUDGE
#define dbg(x...) cout<<"["<<#x<<"]=[";_p(x)
#else 
#define dbg(x...)
#endif
//=================================================================================




const int N=1e6+6;
int n,m,k,x,y,z,a,b,c,d,i,j,l,r,f;








void sol()
{   
    cin>>n;
    si s;
    fo(i,n)cin>>x,s.insert(x);
    
    
    
    cout<< ((s.size()==n)?"YES":"NO") <<endl;
}





int32_t main()
{
    ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
    //sp(10);
    // w(t)
    sol();
    return 0;
}

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

typedef int64_t Int;
#define all(x) (x).begin(), (x).end()
 
const double EPS = 1e-10;
const Int INF = 1e18;
const int inf = 1e9;
const Int mod = 1e9+7;

bool print_space_enable = false;
void print() { 
    cout << '\n'; 
    print_space_enable = false;
}

template <class Head, class... Tail>
void print(Head&& head, Tail&&... tail) {
    if (print_space_enable) cout << " ";
    cout << fixed << setprecision(15) << head;
    print_space_enable = true;
    print(std::forward<Tail>(tail)...);
}

template<typename T>
void print(vector<T> v) {
    for (size_t i = 0; i < v.size(); i++) {
        if (i > 0) std::cout << " ";
        std::cout << v[i];
    }
    std::cout << std::endl;
}

int main() {
    string s;
    cin >> s;
    Int res = 0;
    for (Int i = 0; i < (Int)s.size(); i++) {
        res += s[i] - '0';
    }
    print(res % 9 == 0 ? "Yes" : "No");
    return 0;
}


Measured memory_bytes: 3736
import java.io.*;
import java.util.*;
import java.math.BigInteger;
public class Main{

  public static void main(String[] args) {
    InputReader in = new InputReader(System.in);
    PrintWriter w = new PrintWriter(System.out);
    int W=in.nextInt(),a=in.nextInt(),b=in.nextInt();
    //System.out.println("hi");
    if (Math.abs(b-a)<=W)
      w.println(0);
    else{
      if (b<a)
        w.println(a-(b+W));
      else
        w.println(b-(a+W));
    }
    w.close();
    }

  static class InputReader {

    private final InputStream stream;
    private final byte[] buf = new byte[8192];
    private int curChar, snumChars;
    private SpaceCharFilter filter;

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

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

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

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

    public int[] nextIntArray(int n) {
      int a[] = new int[n];
      for (int i = 0; i < n; i++) {
        a[i] = nextInt();
      }
      return a;
    }

    public String readString() {
      int c = snext();
      while (isSpaceChar(c)) {
        c = snext();
      }
      StringBuilder res = new StringBuilder();
      do {
        res.appendCodePoint(c);
        c = snext();
      } while (!isSpaceChar(c));
      return res.toString();
    }

    public String nextLine() {
      int c = snext();
      while (isSpaceChar(c))
      c = snext();
      StringBuilder res = new StringBuilder();
      do {
        res.appendCodePoint(c);
        c = snext();
      } while (!isEndOfLine(c));
      return res.toString();
    }

    public boolean isSpaceChar(int c) {
      if (filter != null)
      return filter.isSpaceChar(c);
      return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
    }

    private boolean isEndOfLine(int c) {
      return c == '\n' || c == '\r' || c == -1;
    }

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


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

using namespace std;
#define all(a)a.begin(),a.end()
using ll=long long;
const int INF = 1<<30;
const ll INFll =1LL<<62;
const int mod =(1e9)+7;
using P = pair<ll,ll>;

int main(){
   ll n,t;cin>>n>>t;
   vector<vector<ll>>dp(n+1,vector<ll>(6100,0));
   vector<vector<ll>>rp(n+1,vector<ll>(6100,0));
   vector<ll>a(n);
   vector<ll>b(n);
    for (int i = 0; i < n; ++i) {
        cin >>a[i]>>b[i];
    }
    for (int i = 0; i < n; ++i) {
        for (int j = 0; j < t; ++j) {
            dp[i+1][j+a[i]]=max(dp[i][j]+b[i],dp[i][j+a[i]]);
            dp[i+1][j]=max(dp[i+1][j],dp[i][j]);
        }
    }
    reverse(all(a));
    reverse(all(b));
    for (int i = 0; i < n; ++i) {
        for (int j = 0; j < t; ++j) {
            rp[i+1][j+a[i]]=max(rp[i][j]+b[i],rp[i][j+a[i]]);
            rp[i+1][j]=max(rp[i][j],rp[i+1][j]);
        }
    }
    reverse(all(b));
    ll ans=0;
    for (int i = 0; i < n; ++i) {
        for (int j = 0; j < t; ++j) {
            ans=max(ans,dp[i][j]+rp[n-i-1][t-j-1]+b[i]);
//            cout <<i<<" "<<j<<" "<<dp[i][j]<<" "<<rp[n-i-1][t-j-1]<<" "<<b[i]<<endl;
        }
    }
    cout <<ans <<endl;
   return 0;
}



Measured memory_bytes: 286592
#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (int)(n); i++)
 
using namespace std;
 
typedef long long ll;
typedef unsigned long long u_ll;
typedef pair<int, int> pair_;
 
const int INF = 1001001001;
const int dx[] = {-1, 0, 1, 0};
const int dy[] = {0, -1, 0, 1};
int k;
 
int gcd(int a, int b){
    if(b == 0) return a;
 
    return gcd(b, a%b);
}
 
int main(){

    ll n;
    cin >> n;
    
    ll ans = 100100100100100;

    for(ll i = 2; i*i <= n; i++){
        if(n%i==0) {
            ll i_ = n/i;
            ans = min(ans, i_+i-2);
        }
        else continue;
    }

    if(ans==100100100100100){
        cout << n-1;
    }
    else cout << ans;

    return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) REP(i,0,n)
#define REP(i,s,e) for(int i=(s); i<(int)(e); i++)
#define repr(i, n) REPR(i, n, 0)
#define REPR(i, s, e) for(int i=(int)(s-1); i>=(int)(e); i--)
#define pb push_back
#define all(r) r.begin(),r.end()
#define rall(r) r.rbegin(),r.rend()
#define fi first
#define se second

typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

const ll INF = 1e18;
const ll MOD = 1e9 + 7;
const double EPS = 1e-8;

template<typename T> T chmax(T& a, const T& b){return a = (a > b ? a : b);}
template<typename T> T chmin(T& a, const T& b){return a = (a < b ? a : b);}

// #define DEBUG_MODE
#ifdef DEBUG_MODE
#define dump(x) cout << #x << " : " << x << " "
#define dumpL(x) cout << #x << " : " << x << '\n'
#define LINE cout << "line : " << __LINE__ << " "
#define LINEL cout << "line : " << __LINE__ << '\n'
#define dumpV(v) cout << #v << " : ["; for(auto& t : v) cout << t << ", "; cout<<"]" << " "
#define dumpVL(v) cout << #v << " : ["; for(auto& t : v) cout << t << ", "; cout<<"]" << endl
#define STOP assert(false)
#else
#define dump(x) 
#define dumpL(x) 
#define LINE 
#define LINEL 
#define dumpV(v) 
#define dumpVL(v) 
#define STOP assert(false)
#endif
#define mp make_pair
 
namespace std {
template<class S, class T>
ostream &operator <<(ostream& out, const pair<S, T>& a) {
    out << '(' << a.fi << ", " << a.se << ')';
    return out;
}
}
 

int main(){
    int n;
    cin >> n;
    vector<string> s(n);
    rep(i, n) {
        cin >> s[i];
    }
    vector<pll> v(n);
    rep(i, n) {
        ll cur = 0, mi = 0;
        for(auto&& c: s[i]) {
            if(c =='(') cur++;
            else cur--;
            chmin(mi, cur);
        }
        v[i] = {mi, cur};
    }
    sort(rall(v));
    vector<pll> pos;
    vector<pll> neg;
    rep(i, n) {
        if(v[i].se > 0) pos.pb(v[i]);
        else neg.emplace_back(v[i].fi, v[i].se);
    }
    sort(rall(pos));
    sort(all(neg), [&](pll& a, pll& b){return a.fi-a.se != b.fi-b.se ? a.fi-a.se < b.fi-b.se : a < b;});
    dumpVL(v);
    dumpVL(pos);
    dumpVL(neg);
    int cur = 0;
    for(auto&& p: pos) {
        dumpL(p);
        if(cur+p.fi < 0) {
            cout << "No" << '\n';
            return 0;
        }
        cur += p.se;
    }
    for(auto&& p: neg) {
        dump(cur);dumpL(p);

        if(cur+p.fi < 0) {
            cout << "No" << '\n';
            return 0;
        }
        cur += p.se;
    }
    if(cur == 0) cout << "Yes" << '\n';
    else cout << "No" << '\n';
    return 0;
}

Measured memory_bytes: 70352
import java.util.*;

public class Main {
    public static int[][][] memo;
    
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        
        while (true) {
            int M = sc.nextInt();
            int Nmin = sc.nextInt();
            int Nmax = sc.nextInt();
            if (M == 0 && Nmin == 0 && Nmax == 0) break;
            
            int[] arr = new int[M];
            
            for (int i = 0; i < M; i++) {
                arr[i] = sc.nextInt();
            }
            
            int gap = -9999;
            int ans = -99;
            
            for (int n = Nmin; n <= Nmax; n++) {
                int g = arr[n-1] - arr[n];
                if (gap <= g) {
                    gap = g;
                    ans = n;
                }
            }
            
            System.out.println(ans);
        }
    }
}




Measured memory_bytes: 57340
#include <bits/stdc++.h>
#define fi first
#define se second
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define rrep(i,n) for(int i = 1; i <= (n); ++i)
#define drep(i,n) for(int i = (n)-1; i >= 0; --i)
#define srep(i,s,t) for (int i = s; i < t; ++i)
#define each(it,c) for(__typeof((c).begin()) it=(c).begin();it!=(c).end();it++)
#define rng(a) a.begin(),a.end()
#define maxs(x,y) x = max(x,y)
#define mins(x,y) x = min(x,y)
#define pb push_back
#define sz(x) (int)(x).size()
#define pcnt __builtin_popcount
#define uni(x) x.erase(unique(rng(x)),x.end())
#define snuke srand((unsigned)clock()+(unsigned)time(NULL));
#define df(x) int x = in()
#define dame { puts("-1"); return 0;}
#define show(x) cout<<#x<<" = "<<x<<endl;
#define PQ(T) priority_queue<T,vector<T>,greater<T> >
#define bn(x) ((1<<x)-1)
#define newline puts("")
#define v(T) vector<T>
#define vv(T) vector<vector<T>>
using namespace std;
typedef long long int ll;
typedef unsigned uint;
typedef unsigned long long ull;
typedef pair<int,int> P;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef vector<P> vp;
inline int in() { int x; scanf("%d",&x); return x;}
inline void priv(vi a) { rep(i,sz(a)) printf("%d%c",a[i],i==sz(a)-1?'\n':' ');}
template<typename T>istream& operator>>(istream&i,vector<T>&v)
{rep(j,sz(v))i>>v[j];return i;}
template<typename T>string join(const vector<T>&v)
{stringstream s;rep(i,sz(v))s<<' '<<v[i];return s.str().substr(1);}
template<typename T>ostream& operator<<(ostream&o,const vector<T>&v)
{if(sz(v))o<<join(v);return o;}
template<typename T1,typename T2>istream& operator>>(istream&i,pair<T1,T2>&v)
{return i>>v.fi>>v.se;}
template<typename T1,typename T2>ostream& operator<<(ostream&o,const pair<T1,T2>&v)
{return o<<v.fi<<","<<v.se;}
const int MX = 200005, INF = 1001001001;
const ll LINF = 1e18;
const double eps = 1e-10;



int main() {
  int h,w;
  scanf("%d%d",&h,&w);
  int n = 10;
  vvi a(n,vi(n));
  rep(i,n)rep(j,n) scanf("%d",&a[i][j]);
  vi c(n);
  rep(i,h)rep(j,w) {
    int x;
    scanf("%d",&x);
    if (x == -1) continue;
    c[x]++;
  }
  rep(k,n)rep(i,n)rep(j,n) mins(a[i][j],a[i][k]+a[k][j]);
  int ans = 0;
  rep(i,n) {
    ans += a[i][1]*c[i];
  }
  cout<<ans<<endl;
  return 0;
}






















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

#define DUMP(x) cerr << #x << "=" << x << endl
#define DUMP2(x, y) cerr<<"("<<#x<<", "<<#y<<") = ("<<x<<", "<<y<<")"<< endl
#define BINARY(x) static_cast<bitset<16> >(x)

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

#define in_range(x, y, w, h) (0<=(int)(x) && (int)(x)<(int)(w) && 0<=(int)(y) && (int)(y)<(int)(h))
#define ALL(a) (a).begin(),(a).end()

typedef long long ll;
const int INF   = 1e9;
const ll  INFLL = 1e18;
typedef pair<int, int> PII;
int dx[4]={0, -1, 1, 0}, dy[4]={-1, 0, 0, 1};

// #define DEBUG

int main()
{
    ios::sync_with_stdio(false);
    typedef pair<bitset<10>, int> State;

    int N;
    while (cin >> N, N) {
#ifdef DEBUG
        cerr << "===============================" << endl;
#endif
        bool ans = true;
        vector<State> SS;
        bool memo[1<<11][10] = {};

        string S; cin >> S;
        bitset<10> now(0);
        for (auto s : S) {
            if (s == 'u') {
                now = bitset<10>(0);
            } else {
                int l = s - '0';
                if (now.test(l)) {
                    ans = false;
                } 
                SS.emplace_back(now, l);
                memo[now.to_ulong()][l] = true;
                now.set(l);
            }
        }

        bool update = true;
        while (update && ans) {
#ifdef DEBUG
            cerr << "---------------------" << endl;
            for (auto s : SS) cerr << s.first << " " << s.second << endl;
#endif
            update = false;
            vector<State> nSS = SS;

            for (int i=0; i<SS.size(); i++) {
                for (int j=i+1; j<SS.size(); j++) {
                    State s1 = SS[i], s2 = SS[j];
                    if ((s1.first & s2.first).count() == 0) {
                        if (s2.first.test(s1.second) && s1.first.test(s2.second)) {
                            ans = false;
                            goto END;
                        } else if (s2.first.test(s1.second)) {
                            State ns((s1.first | s2.first), s2.second);
                            if (!memo[ns.first.to_ulong()][ns.second]) {
                                nSS.push_back(ns);
                                memo[ns.first.to_ulong()][ns.second] = true;
                                update = true;
                            }
                        }
                    }
                }
            }

            SS = nSS;
        }
END:
        cout << (ans ? "SAFE" : "UNSAFE") << endl;
    }
}

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

int main() {
	long long N, A, B;
	cin >> N >> A >> B;
	long long a = N / (A + B);
	long long b = N % (A + B);
	long long total = 0;
	total += a * A;
	if (b <= A) {
		total += b;
	}
	else {
		total += A;
	}
	cout << total << endl;
}


Measured memory_bytes: 3648
#include<algorithm>
#include<array>
#include<cmath>
#include<iostream>
#include<iomanip>
#include<iso646.h>
#include<queue>
#include<stack>
#include<string>
#include<vector>

using std::cin;
using std::cout;
using std::endl;
using std::string;
using std::vector;

#define FOR(counter,initial_value,condition) for(int counter = initial_value; counter < condition;counter++)

int digitSum(int n,int digit=8) {
	int x = 1;
	FOR(i,0,digit){
		x *= 10;
	}
	int sum = 0;
	FOR(i, 0, digit) {
		sum += n / x;
		n %= x;
		x /= 10;
	}
	sum += n;
	return sum;
}

int main()
{
	int N;
	cin >> N;
	int f = digitSum(N);
	cout << ((N%f == 0)?"Yes":"No") << endl;
}


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

public class Main {
    FastScanner in;
    PrintWriter out;

    void solve() {
        int n = in.nextInt();
        int k = in.nextInt();
        int ans = 1, len = k;
        while (len < n) {
            ans++;
            len += k - 1;
        }
        out.println(ans);
    }

    void run() {
        try {
            in = new FastScanner(new File("Main.in"));
            out = new PrintWriter(new File("Main.out"));

            solve();

            out.close();
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }
    }

    void runIO() {

        in = new FastScanner(System.in);
        out = new PrintWriter(System.out);

        solve();

        out.close();
    }

    class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        public FastScanner(File f) {
            try {
                br = new BufferedReader(new FileReader(f));
            } catch (FileNotFoundException e) {
                e.printStackTrace();
            }
        }

        public FastScanner(InputStream f) {
            br = new BufferedReader(new InputStreamReader(f));
        }

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

        boolean hasMoreTokens() {
            while (st == null || !st.hasMoreTokens()) {
                String s = null;
                try {
                    s = br.readLine();
                } catch (IOException e) {
                    e.printStackTrace();
                }
                if (s == null)
                    return false;
                st = new StringTokenizer(s);
            }
            return true;
        }

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

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

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

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

Measured memory_bytes: 21076
#include <iostream>

using namespace std;

int main()
{
  char S;
  cin >> S;
  
  switch(S)
  {
    case 'S': cout << "Cloudy"; break;
    case 'C': cout << "Rainy"; break;
    case 'R': cout << "Sunny"; break;
  }
  
  return 0;
}

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

string s, ss = "+";
int a[5];
char c[2] = {'+', '-'};
bool check = false;

int cal(string x){
    int ans = 0;
    for (int i = 0; i < x.size(); i++) ans += a[i] * ((x[i] == '+')? 1 : -1);
    return ans;
}

void sev(int i){
    if (!check){
        for (int j = 0; j < 2; j++){
            ss += c[j];
            if (ss.size() == 4){
                if (cal(ss) == 7){
                    ss.erase(0, 1);
                    for (int i = 0; i < 3; i++) cout << a[i] << ss[i];
                    cout << a[3] <<"=7 \n";
                    check = true;
                    return;
                }
            }
            else sev(i+1);
            ss.erase(ss.size()-1, 1);
        }
    }
}

int main(){
    cin >> s;
    for (int i = 0; i < s.size(); i++) a[i] = s[i] - '0';
    sev(1);
}

Measured memory_bytes: 256
#include<iostream>
#include<math.h>
using namespace std;
int main() {
	int kazu, score, q = 0, sum = 0, ave;
	//審査員の数を入れる
	while (cin >> kazu) {
		if (kazu == 0)break;
		int *point = new int[kazu];
		while (cin >> score) {
			for (int w = 0; w < q; w++) {
				if (point[w] < score)
					swap(point[w], score);
			}
			point[q] = score;
			q++;
			if (q == kazu)break;
		}
		for (int w = 1; w < q-1; w++) {
			sum += point[w];
		}
		sum /= q-2;
		cout << sum << endl;
		sum = 0; q = 0;
	}
	return 0;
}


Measured memory_bytes: 3100
#include<iostream>

#define REP(i,a,b) for(i=a;i<b;i++)
#define rep(i,n) REP(i,0,n)
using namespace std;


int main () {
  int n, a[100];
  int i;
  cin >> n;
  rep(i,n) {
    cin >> a[i];
  }
  rep(i,n) {
    cout << a[n-1-i];
    if (i != n-1) {
      cout << " ";
    }
  }
  cout << endl;
  return 0;
}

Measured memory_bytes: 1160
#include <stdio.h>

int main(void) {

  long n,a,b;
  scanf("%ld %ld %ld", &n, &a, &b);
  long max = a+b*(n-1);
  long min = a*(n-1)+b;
  long answer = max-min+1;
  if (answer < 0) {
    answer = 0;
  }
  printf("%ld\n", answer);

  return 0;
}

Measured memory_bytes: 128
#include <iostream>
#include <string>
#include <algorithm>
#include <functional>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <cstdio>
#include <cmath>
#include <tuple>
#include <iomanip>
#include <numeric>
#include <unordered_map>
#include <sstream>
#include<limits.h>
#include<float.h>
#include<list>
#include <array>
#include <complex>
#include<stdio.h>
#include<string.h>
#include <bitset>

using namespace std;
#define int long long

#define I32_MAX 2147483647
#define I64_MAX 9223372036854775807LL
#define I64_MAX2 1223372036854775807LL
#define INF I64_MAX2
#define MOD 1000000007
#define MEM_SIZE 10000
#define DEBUG_OUT true
#define ALL(x) (x).begin(), (x).end()

template<typename T> void DEBUG(T e){if(DEBUG_OUT == false)return; std::cout << e <<" ";}
template<typename T> void DEBUG(const std::vector<T>& v){if(DEBUG_OUT == false)return;for(const auto& e : v){std::cout<< e << " "; } std::cout << std::endl;}
template<typename T> void DEBUG(const std::vector<std::vector<T> >& vv){if(DEBUG_OUT == false)return;for(const auto& v : vv){ DEBUG(v); } }
template<class T,class... Ts> void DEBUG(T d, Ts... e){if(DEBUG_OUT == false)return;DEBUG(d);DEBUG(e...);}
template <class T> void corner(bool flg, T hoge) {if (flg) {cout << hoge << endl; abort();}}
template< typename T1, typename T2 > inline bool chmax(T1 &a, T2 b) { return a < b && (a = b, true); }
template< typename T1, typename T2 > inline bool chmin(T1 &a, T2 b) { return a > b && (a = b, true); }
//SOLVE


void solve (void)
{
  int N;
  cin>>N;
  vector<vector<int> > vv (N,vector<int>(10,0));
  for (int i = 0; i < N; i++)
  {
    for (int j = 0; j < 10; j++)
    {
      cin>>vv[i][j];
    }
  }
  vector<vector<int> > data (N,vector<int>(11,0));
  for (int i = 0; i < N; i++)
  {
    for (int j = 0; j < 11; j++)
    {
      cin>>data[i][j];
    }
    
  }
  // DEBUG(data);
  int MAX =-1*INF;
  for (int b = 1; b < (2<<9); b++)
  {
    vector<int> SHOP(10);
    for (int i = 0; i < 10; i++)
    {
      int X = (int)((b>>i)&1);
      SHOP[i] = X;
    }
    // DEBUG(SHOP);
    int SUM = 0;
    for (int i = 0; i < N; i++)
    {
      int cnt = 0;
      for (int j = 0; j < 10; j++)
      {
        cnt += SHOP[j]*vv[i][j];
      }
      SUM += data[i][cnt];
    }
    if(chmax(MAX,SUM))
    {
      // DEBUG(b,SHOP);
    }
    
  }
  cout<<MAX<<endl;
  
  
  return;
}
int32_t main(int32_t argc, const char *argv[])
{
  std::ios::sync_with_stdio(false);
  std::cin.tie(0);

  std::cout << std::fixed;
  std::cout << std::setprecision(9);
  solve();

  return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rrep(i,n) for(int i=(int)(n-1);i>=0;i--)
#define FOR(i,n,m) for(int i=n;i<=(int)(m);i++)
#define RFOR(i,n,m) for(int i=(int)(n);i>=m;i--)
#define all(x) (x).begin(),(x).end()
#define sz(x) int(x.size())
typedef long long ll;
const int INF = 1e9;
const int MOD = 1e9+7;
const ll LINF = 1e18;
using namespace std;
vector<int> dy={1,0,-1,0};
vector<int> dx={0,1,0,-1};
template<class T>
vector<T> make_vec(size_t a){
    return vector<T>(a);
}
template<class T, class... Ts>
auto make_vec(size_t a, Ts... ts){
    return vector<decltype(make_vec<T>(ts...))>(a, make_vec<T>(ts...));
}

int main(){
    int n;string s;
    cin>>n>>s;
    vector<int> a(6000);
    
    int ans=0;
    FOR(len,1,n) {
        string t=s.substr(n-len,len);
        
        rep(i,len) a[i]=0;
        a[0]=len;
        int i=1,j=0;
        while(i<n) {
            while(i+j<n && t[j]==t[i+j]) j++;
            a[i]=j;
            if(j==0){
                i++;
                continue;
            }
            int k=1;
            while(i+k<n && k+a[k]<j) {
                a[i+k]=a[k];
                k++;
            }
            i+=k;
            j-=k;
        }
        
        rep(x,len) ans=max(ans,min(a[x],x));
    }
    cout<<ans<<endl;
}


Measured memory_bytes: 384
#!/usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
import itertools
sys.setrecursionlimit(10**5)
stdin = sys.stdin
bisect_left = bisect.bisect_left
bisect_right = bisect.bisect_right
def LI(): return list(map(int, stdin.readline().split()))
def LF(): return list(map(float, stdin.readline().split()))
def LI_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def II(): return int(stdin.readline())
def IF(): return float(stdin.readline())
def LS(): return list(map(list, stdin.readline().split()))
def S(): return list(stdin.readline().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')

#A
def A():
    n = S()
    for i in n:
        if i == "1":
            print(9, end="")
        else:
            print(1, end="")
    print()
    return

#B
def B():
    n = II()
    for i in range(111, 1000, 111):
        if n <= i:
            print(i)
            return
    return

#C
def C():
    return

#D
def D():
    return

#Solve
if __name__ == '__main__':
    B()


Measured memory_bytes: 38512
#!/usr/bin/env python3
import itertools
n = int(input())
s = input()
t = input()
for l in itertools.count(n):
    it = (s + 'a' * l)[: l - len(t)] + t
    if len(it) >= n and it.startswith(s) and it.endswith(t):
        break
print(len(it))


Measured memory_bytes: 3064
use proconio::*;
use proconio::marker::*;
use std::collections::*;
use std::cmp::*;
use std::ops::Bound::*;
use num::integer::gcd;

/*
fn gcd(a: u64, b: u64) -> u64 {
    if b == 0 {
        a
    } else {
        gcd(b, a % b)
    }
}
*/

fn calc(n: u64) -> (u64, u64) {
    let mut n = n;
    let mut res = (0, 0);
    while n % 2 == 0 {
        res.0 += 1;
        n /= 2;
    }
    while n % 5 == 0 {
        res.1 += 1;
        n /= 5;
    }
    res
}

fn run() {
    input! {
        n: usize,
        a: [Chars; n],
    }
    let mut map = std::collections::BTreeMap::<((u64, u64), (u64, u64)), u64>::new();
    for s in a {
        let mut de = 0u64;
        let mut val = 0u64;
        for c in s {
            if c == '.' {
                de = 1;
            } else {
                val = 10 * val + c.to_digit(36).unwrap() as u64;
                de *= 10;
            }
        }
        if de == 0 {
            let p = calc(val);
            *map.entry((p, (0, 0))).or_insert(0) += 1;
        } else {
            let g = gcd(de, val);
            de /= g;
            val /= g;
            let (p, c) = (calc(val), calc(de));
            *map.entry((p, c)).or_insert(0) += 1;
        }
    }
    let mut val = vec![];
    for (a, cnt) in map {
        val.push((a, cnt));
    }
    let mut ans = 0;
    for (i, p) in val.iter().enumerate() {
        let ((nu, de), cnt) = *p;
        if de.0 == 0 && de.1 == 0 {
            ans += cnt * (cnt - 1) / 2;
        }
        for q in val.iter().take(i) {
            let ((x, y), z) = *q;
            if nu.0 + x.0 >= y.0 + de.0 && nu.1 + x.1 >= y.1 + de.1 {
                ans += z * cnt;
            }
        }
    }
    println!("{}", ans);
}

fn main() {
    run();
}


Measured memory_bytes: 26444
#include <iostream>
#include <vector>
#include <map>
#include <string>
#include <math.h>
#include <algorithm>
#include <numeric>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)

int main() {
    int n;
    cin >> n;
    map<string, int> maps;
    rep(i, n) {
        string input;
        cin >> input;
        maps[input] = 0;
    }

    cout << maps.size() << endl;
}

Measured memory_bytes: 19260
#include<bits/stdc++.h>
using namespace std;
 
int main(){
	int n;
	cin>>n;
	
	long long sum=0,x,a[200001];
	a[0]=0;
	for (int i = 1; i <= n; i++){
		cin>>x;
		sum+=x;
		a[i]=sum;
	}

	sort(a,a+n+1);

	long long ans=0;
	long long count=1;
	for (int i = 1; i <= n; i++){
		if(a[i]==a[i-1])
			count++;
		else{
			ans+=count*(count-1)/2;
			count=1;
		}
	}
	ans+=count*(count-1)/2;

	cout<<ans<<endl;

}


Measured memory_bytes: 1792
package main

import (
	"fmt"
	"sort"
)

func main() {
	var A, B, K int
	fmt.Scan(&A, &B, &K)

	m := make(map[int]int)
	for i := A; i < min(A+K, B); i++ {
		m[i] = i
	}
	for i := max(B-(K-1), A); i <= B; i++ {
		m[i] = i
	}

	var n []int
	for _, v := range m {
		n = append(n, v)
	}
	sort.Ints(n)
	for _, v := range n {
		fmt.Println(v)
	}
}

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

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


Measured memory_bytes: 640
#include <bits/stdc++.h>
using namespace std;
using ll=long long;
using Graph=vector<vector<int>>;
#define MAX 5100000
#define MOD 1000000007
#define INF 100000000000000

int solve(vector<int> l,int A){
  int n=l.size();
  int ans=1000000000;
  for(int i=1;i<(1<<n);i++){
    int k=i;
    vector<int> a(n);
    for(int j=0;j<n;j++){
      a.at(j)=k&1;
      k>>=1;
    }
    int sum=0;
    int s=0;
    for(int j=0;j<n;j++){
      sum+=l.at(j)*a.at(j);
      s+=a.at(j);
    }
    ans=min(ans,abs(sum-A)+10*(s-1));
  }
  return ans;
}

int main(){
  int N,A,B,C;
  cin>>N>>A>>B>>C;
  vector<int> l(N);
  for(int i=0;i<N;i++){
    cin>>l.at(i);
  }
  int n=1;
  for(int i=0;i<N;i++){
    n*=3;
  }
  int ans=1000000000;
  for(int i=0;i<n;i++){
    int k=i;
    vector<vector<int>> a(3);
    for(int j=0;j<N;j++){
      a.at(k%3).push_back(l.at(j));
      k/=3;
    }
    if(a.at(0).size()==0||a.at(1).size()==0||a.at(2).size()==0){
      continue;
    }
    ans=min(ans,solve(a.at(0),A)+solve(a.at(1),B)+solve(a.at(2),C));
  }
  cout<<ans<<endl;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
int main(){
    int h,w,k;
    cin >> h >> w >> k;
    vector<vector<bool>> c(h, vector<bool>(w)); //false:white true:black
    rep(y, h)  {
        string s;
        cin >> s;
        rep(x,w) {
            if (s[x] == '.') c[y][x] = false;
            else c[y][x] = true;
        }
    }
    int ans = 0;
    rep(y,1<<h) rep(x,1<<w) {
        int black_num = 0;
        rep(y2,h) rep(x2,w) {
            if((y>>y2&1) || (x>>x2&1)) continue;
            if(c[y2][x2]) black_num++;
        }
        if(black_num == k) {
            ans++;
        }
    }
    cout << ans << endl;
}


Measured memory_bytes: 3632
#include<cstdio>
#include<iostream>
#include<string>

using namespace std;

int main(void) {

	bool br = false;
	char tmp;
	int h, w;
	string s;

	cin >> h >> w;

	for (int k = 0; k < h; k++) {
		if (br == true)break;
		for (int l = 0; l < w; l++) {
			cin >> s;
			tmp = l+65;
			if (s == "snuke") {
				cout << tmp << k + 1 << "\n";
				br = true;
				break;
			}
		}
	}
	

	return 0;
}

Measured memory_bytes: 256
#define __USE_MINGW_ANSI_STDIO 0
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <vector>
#include <algorithm>
#include <queue>
#include <map>
#include <set>
#include <stack>
#include <string.h>
#include <math.h>

using namespace std;

#define PI 3.141592653589793
#define epsilon 0.000000001
#define INF 1000000000000000000
#define MOD 1000000007

int N;
long long floyds [310][310], ret = 0ll;

int main(){
    //freopen("subrev.in", "r", stdin); freopen("subrev.out", "w", stdout);
    cin >> N;
    for(int i = 0; i < N; i++)
        for(int j = 0; j < N; j++)
            cin >> floyds[i][j];
    if(N == 1){ cout << "0\n"; return 0; }
    if(N == 2){ cout << floyds[0][1] << '\n'; return 0; }
    for(int k = 0; k < N; k++){
        for(int i = 0; i < N; i++){
            if(i == k) continue;
            for(int j = 0; j < N; j++)
                if(floyds[i][k]+floyds[k][j] < floyds[i][j]){
                    ret = -1;
                    break;
                }
            if(ret == -1) break;
        }
        if(ret == -1) break;
    }
    if(ret == -1){ cout << ret << '\n'; return 0; }
    for(int i = 0; i < N; i++){
        for(int j = i+1; j < N; j++){
            bool isEdge = true;
            for(int k = 0; k < N; k++)
                if(k != i && k != j && floyds[i][k]+floyds[k][j] == floyds[i][j])
                    isEdge = false;
            if(isEdge) ret += floyds[i][j];
        }
    }
    cout << ret << '\n';
    return 0;
}


Measured memory_bytes: 1024
#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <set>
#include <cmath>
#include <stdio.h>
#include <list>
#include <numeric>
#include <stack>
#include <queue>
#include <tuple>
#include <bitset>
#include <map>
#include <math.h>
//　ceil(a/b)   (a + (b - 1))/ b
using namespace std;
#define rep(i,n) for(int i = 0; i < (n); i++)
typedef long long ll;
typedef pair<int,int> P;
const int inf=1000000007;
const ll mod=1000000007;
const double PI=3.14159265358979323846;
int dx[] = {1,-1,0,0};
int dy[] = {0,0,1,-1};


long long x[65],y[65],z[65];

int main(){
  int N;
  cin >> N;
  ll ans = 0;
  rep(i,N){
    ll num;
    cin >> num;
    for(int j=0;j<61;j++){
      if(num%2==0) x[j]++;
      else y[j]++;
      num/=2;
    }
  }
  rep(i,65){
    z[i] = (x[i]*y[i]) % 1000000007;
  }
  for(int j = 64; j>=0;j--){
    ans = (2*ans+z[j])% 1000000007;
  }
  cout << ans << endl;
  
  return 0;
}



// int gcd(int a, int b){
//   if (b==0) return a;
//   else return gcd(b,a%b);
// }


// ll memo[2020][2020];
// int pascal_triangle(){
//   for(int i = 0; i < 1000; i++){
//     for(int j = 0; j < i+1; j++){
//       if(j == 0 || j == i) memo[i][j] = 1;
//       else{
// 	memo[i][j] = (memo[i-1][j-1]+memo[i-1][j])%mod;
//       }
//     }
//   }
//   return 0;
// }


// int factorial(int n){
//   if(n == 0) return 1;
//   return n*factorial(n-1);
// }

// int divisor(int a){
//   int cnt = 0;
//   for(int i=1; i <= a; i++) if(a%i == 0) cnt++;
//   return cnt;
// }

// int comb(int n, int k){
//   pascal_triangle();
//   return memo[n][k];
// }

// int cans(bool f){
//   if(f) cout << "Yes" << endl;
//   else cout << "No" << endl;
//   return 0;
// }







//二項係数(mod剰余)----------------------------

// const int MAX = 3000010;
// const int M = 1000000007;

// vector<ll> fac(MAX); //n!(mod M)
// //a,bの範囲的にこれだけ配列を用意していけば十分
// vector<ll> ifac(MAX); //k!^{M-2} (mod M)

// ll mpow(ll x, ll n){ //x^n(mod M) ←普通にpow(x,n)では溢れてしまうため，随時mod計算
//     ll ans = 1;
//     while(n != 0){
//         if(n&1) ans = ans*x % M;
//         x = x*x % M;
//         n = n >> 1;
//     }
//     return ans;
// }

// ll COMinit(){
//   //大した量ではないので，先にfax[i]とifax[i]を全て計算しておく
//   fac[0] = 1;
//   ifac[0] = 1;
//   for(ll i = 0; i<MAX; i++){
//     fac[i+1] = fac[i]*(i+1) % M; // n!(mod M)
//     ifac[i+1] = ifac[i]*mpow(i+1, M-2) % M; // k!^{M-2} (mod M) ←累乗にmpowを採用
//   }
//   return 0;
// }

// ll COM(ll a, ll b){ //aCbをmod計算
//   if(a == 0 && b == 0)return 1;
//   if(a < b || a < 0)return 0;
//   ll tmp = ifac[a-b]* ifac[b] % M;
//   return tmp * fac[a] % M;
// }

//-----------------------------------------


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

ll gcd(ll n, ll m){
    if(n % m == 0){
        return m;
    }
    return gcd(m, n % m);
}

ll lcm(ll n, ll m){
    return n / gcd(n, m) * m;
}

int main()
{
    int n;
    cin >> n;
    ll t[101];
    ll ans = 1;
    for(int i = 0; i < n; i++){
        cin >> t[i];
        ans = lcm(ans, t[i]);
    }
    cout << ans << endl;
}

Measured memory_bytes: 256
#include "bits/stdc++.h"
using namespace std;
#define ll long long int
#define rep(i,n) for( int i = 0; i < n; i++ )
#define rrep(i,n) for( int i = n; i >= 0; i-- )
#define REP(i,s,t) for( int i = s; i <= t; i++ )
#define RREP(i,s,t) for( int i = s; i >= t; i-- )
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define INF 2000000000
#define mod 1000000007
#define INF2 1000000000000000000


int main(void)
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    int N, M, X;
    cin >> N >> M >> X;
    int C[13], A[13][13];
    rep(i, N) {
        cin >> C[i];
        rep(j, M) cin >> A[i][j];
    }
    int ans = INF;
    rep(bit, (1 << N)) {
        int c[13] = {};
        int tmp = 0;
        rep(i, N) {
            if (bit & (1 << i)) {
                tmp += C[i];
                rep(j, M) {
                    c[j] += A[i][j];
                }
            }
        }
        bool ok = true;
        rep(i, M) if(c[i] < X) ok = false;
        if(ok) ans = min(ans, tmp);
    }
    if(ans == INF) {
        cout << -1 << endl;
    } else {
        cout << ans << endl;
    }

    return 0;
}


Measured memory_bytes: 3656
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < int(n); ++i)
#define rep1(i, n) for (int i = 1; i < int(n); ++i)
#define repx(i, x, n) for (int i = int(x); i < int(n); ++i)
#define rrep(i, n) for (int i = int(n) - 1; i >= 0; --i)
#define ALL(n) begin(n), end(n)
#define IN(a, x, b) ((a) <= (x) && (x) < (b))
#define OUT(a, x, b) ((x) < (a) || (x) < (b))
typedef long long ll;
typedef long double ld;
const ll INF = 1e18;
const ll MOD = 1000000007;

int main()
{
    int n;
    cin >> n;
    n %= 10;
    if (n == 3)
    {
        cout << "bon" << endl;
    }
    else if (n == 0 || n == 1 || n == 6 || n == 8)
    {
        cout << "pon" << endl;
    }
    else
    {
        cout << "hon" << endl;
    }
    return 0;
}


Measured memory_bytes: 3604
# coding: utf-8
N = int(input())
S = input()
ans = 0
for i in range(N):
    n = 0
    X, Y = set(S[:i + 1]), set(S[i + 1:])
    for x in X:
        if x in Y:
            n += 1
    if ans < n:
        ans = n
print(ans)

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

const int MOD=1000000007;
const int INF=0x3f3f3f3f;
const ll INFL=0x3f3f3f3f3f3f3f3f;


int main(){
  
  string s;
  cin >> s;
  ll ans=0;
  for(int i=0;i<(1<<s.size()-1);i++){
    ll num=0;
    ll div=s[0]-'0';
    rep(j,s.size()-1){
      if(i&(1<<j)){
        num+=div;
        div=0;
      }
      div=div*10+s[j+1]-'0';
    }
    num+=div;
    ans+=num;
  }
  cout<<ans<<endl;
}
  



Measured memory_bytes: 256
//Compile: g++ -g -Wshadow -Wall main.cpp -o a.exe -Ofast -Wno-unused-result
//Build: g++ -g -Wshadow -Wall -o "%e" "%f" -g -fsanitize=address -fsanitize=undefined -D_GLIBCXX_DEBUG
//Compile and run: g++ -g -Wshadow -Wall main.cpp -o a.exe -Ofast -Wno-unused-result && a.exe

#pragma GCC optimize("Ofast")

#include <algorithm>
#include <bitset>
#include <chrono>
#include <cmath>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>

typedef long long ll;
typedef long double ld;
typedef std::pair<int, int> pii;
typedef std::pair<long, long> pl;
typedef std::vector<int> vi;
typedef std::vector<ll> vl;
typedef std::vector<pii> vpii;
typedef std::vector<pl> vpl;
typedef std::vector<vi> vvi;
typedef std::vector<vl> vll;
typedef std::map<int, int> mii;
typedef std::priority_queue<int> pqd;
typedef std::priority_queue<int, vi, std::greater<int>> pqi;

#define gc getchar_unlocked
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define F first
#define S second
#define PI 3.14159265358979323846264
#define MOD 1e9 + 7
#define INF INT64_MAX;

#define fo(i, n) for (ll i = 0; i < n; ++i)
#define Fo(i, k, n) for (ll i = k; k < n ? i < n : i > n; k < n ? ++i : --i)
#define all(x) x.begin(), x.end()
#define clr(x) memset(x, 0, sizeof(x))
#define deb(x) cout << #x << "=" << x << endl
#define sortall(x) sort(x.begin(), x.end())
#define tr(it, a) for (auto it = a.begin(); it != a.end(); ++it)
#define ps(x, y) std::fixed << setprecision(y) << x
#define setbits(x) __builtin_popcountll(x)
#define zrobits(x) __builtin_ctzll(x)
#define mk(arr, n, type) type* arr = new type[n]

std::mt19937_64 rng(std::chrono::high_resolution_clock::now().time_since_epoch().count());

inline void setup() {
    std::ios_base::sync_with_stdio(false);
    std::cin.tie(NULL);
    std::cout.tie(NULL);

#ifdef LOCAL_PROJECT  //run with -DLOCAL_PROJECT drung compilation
    freopen("input.txt", "r", stdin);
#else
#ifndef ONLINE_JUDGE  //runs automatically for supported online judges
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
#endif
}

inline void solve();

int main() {
    setup();

    ll t = 1;

    // std::cin >> t;

    while (t--) {
        solve();
    }
    return 0;
}

using namespace std;

inline void solve() {
    ll n;
    cin >> n;

    string s;

    ll countAC = 0;
    ll countWA = 0;
    ll countTLE = 0;
    ll countRE = 0;

    fo(i, n) {
        cin >> s;
        if (s == "AC") {
            ++countAC;
        }
        if (s == "WA") {
            ++countWA;
        }
        if (s == "TLE") {
            ++countTLE;
        }
        if (s == "RE") {
            ++countRE;
        }
    }

    cout << "AC x " << countAC << '\n';
    cout << "WA x " << countWA << '\n';
    cout << "TLE x " << countTLE << '\n';
    cout << "RE x " << countRE << '\n';
}

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

using namespace std;

typedef long long int ll;
typedef long double ld;

int main() {
    //freopen("input.txt", "r", stdin);

    int n, m, M;
    m = 1000000;
    M = -1;

    cin >> n;
    for(int i = 1; i <= n; i++) {
        int x;
        cin >> x;

        m = min(m, x);
        M = max(M, x);
    }

    cout << M - m;
    cout << "\n"; return 0;
}


Measured memory_bytes: 256