Language: C++

//21th centry Copyright by libra9z who's so looking forward to being hacked by someone
//the one who copies my program is really a pig,isn't he? \
(there comes a pig which likes programming!)
//  (\____/)
//  / @__@ \
// (  (oo)  )
//  `-.~~.-'
//   /    \
// @/      \_
//(/ /    \ \)
// WW`----'WW
#pragma comment(linker, "/stack:20000000")
#pragma warning(disable:4146)
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
//#define __EXT_FORBIDDEN_
//#define __DEBUG_FORBIDDEN_
#define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>
#define __str__(...) string(#__VA_ARGS__)
#define retp(...) {cout<<__VA_ARGS__<<endl;return 0;}
#define rep(i,n) for (int i=0;i<(n);i++)
#define repit(it,a) for (__typeof(a.begin()) it=a.begin();it!=a.end();++it)
#define ITR(...) __VA_ARGS__::iterator
#define all(a) (a).begin(),(a).end()
#define reunique(v) sort(all(v)),v.erase(unique(all(v)),v.end())
#define sz(a) (int)a.size()
#define MP(...) make_pair(__VA_ARGS__)
#define X first
#define Y second
#define sqr(x) ((x)*(x))
#define fill_inf(a) memset(a,-19999873,sizeof(a))
#define fill_neginf(a) memset(a,-19999872,sizeof(a))
#define fill_0(a) memset(a,0,sizeof(a))
#define fill_neg1(a) memset(a,-1,sizeof(a))
#define pow_of_2(a) (1<<(a))
#define is_pow_of_2(a) (((a-1)&a)==0)
#define endl '\n'
using namespace std;
#ifndef __EXT_FORBIDDEN_
#include <ext/numeric>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/priority_queue.hpp>
#include <ext/pb_ds/tag_and_trait.hpp>
#include <ext/pb_ds/trie_policy.hpp>
#include <ext/rope>
template <class X,class C=less<X>,class Y=__gnu_pbds::null_type>
using ordered_map=__gnu_pbds::tree<X,Y,C,__gnu_pbds::rb_tree_tag,__gnu_pbds::tree_order_statistics_node_update>;
template <class X,class C=greater<X>>
using heap=__gnu_pbds::priority_queue<X,C>;
#endif
#ifndef __DEBUG_FORBIDDEN_
template<typename T>void _debug(const char*name,T&&t){cerr<<name<<" = "<<t<<endl;}
template<typename T1,typename...T>void _debug(const char*names,T1&&t1,T&&...t)
{const char*comma=strchr(names+1,',');cerr.write(names,comma-names)<<" = "<<t1<<", ";_debug(comma+1,t...);}
#define Debug(...) _debug(#__VA_ARGS__,__VA_ARGS__)
#else
#define Debug(...)
#endif
void do_nothing(){}
using ll=long long;using ull=unsigned ll;using pii=pair <int,int>;
template<typename T>using min_queue=priority_queue<T,vector<T>,greater<T>>;
template<typename T>using max_queue=priority_queue<T>;
template<typename A,typename B>void translater(const A &a,B &b){stringstream ss;ss<<a;ss>>b;}
template<typename T>T gcd(T u,T v){return __gcd(u,v);}
template<typename T>T lcm(T u,T v){return u/gcd(u,v)*v;}
template<typename T>T fastpow(T x,T n,__int64 mod){T r=1;for(;n;x=x*x%mod,n/=2)if(n&1)r=r*x%mod;return r;}
bool isprime(const long long &x){if(x<2)return 0;for(long long i=2;i*i<=x;i++)if(x%i==0)return 0;return 1;}
const int inf=1e9;
const ll lnf=1e18;
const int mod=1e9+7;
int n,ans=inf;
int nums(int x){int res=0;while(x){res+=x%10;x/=10;}return res;}
signed main()
{
	ios_base::sync_with_stdio(false);cin.tie();cout<<setprecision(15);
	cin>>n;
	for (int i=1;i<=n/2;++i) ans=min(ans,nums(i)+nums(n-i));
	cout<<ans<<endl;
	return 0;
}

Compiler output:
a.cc:67:39: error: '__int64' has not been declared
   67 | template<typename T>T fastpow(T x,T n,__int64 mod){T r=1;for(;n;x=x*x%mod,n/=2)if(n&1)r=r*x%mod;return r;}
      |                                       ^~~~~~~