Run ID Author Problem Lang Verdict Score Time Memory Code Length Submit Time
343942 潘弘翊 2023信息与未来T1:幸运数字 C++ Accepted 100 12 MS 272 KB 309 2025-01-12 16:30:43

Tests(10/10):


#include<bits/stdc++.h> using namespace std; int main() { int a,b,s=0,j=0,o=0,w=1,n; cin>>a>>b; for (int i=a; i<=b; i++) { n=i; while (n>0) { if (w%2==0) o+=n%10; else j+=n%10; n/=10; w++; } if (j==o) s++; j=0; o=0; w=1; } cout<<s; return 0; }


Judgement Protocol: