Submission
Status:
[PPPPPPPPPP]
Subtask/Task Score:
{100/100}
Score: 100
User: tull
Problemset: ตรวจบัตรเครดิต
Language: cpp
Time: 0.002 second
Submitted On: 2026-06-03 00:06:16
#pragma GCC optimize("O3,unroll-loops")
#include <bits/stdc++.h>
using namespace std;
//#define int long long
#define bp '\n'
#define ld long double
#define vp cout<<'\n';
#define all(A) A.begin(),A.end()
using pii=pair<int,int>;
const int MOD=1e9+7;
const int MNLL=-1e18;
const int MXLL=1e18;
const int N=2e5+10;
const string sans[]={"no","yes"};
signed main(){
cin.tie(nullptr)->sync_with_stdio(false);
int cnt=0,lv=2;
string a;
cin>>a;
for(int i=14;i>=0;--i){
int x=a[i]-'0';
if(i%2==0){
x*=lv;
}
while(x){
cnt+=x%10;
x/=10;
}
}
cout<<sans[(a[15]-'0'==(10-(cnt%10))%10)];
}
/*
5 7
taohu 0 1 7 9
mafuyu 2 5
ccsleep 2 4 7 25
sira 7
iris 32 64 128
*/