提交时间:2024-09-26 22:32:34

运行 ID: 32700

#include <iostream> using namespace std; #define int long long int t,n; string s; //想了想还是打算把这题思路写出来 学了这么久了不能连T1都A不掉 //一题伪高精(?)高精取余 从后往前依次的数位分离取数加取余 signed main(){ ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr);//卡常 cin>>t; while(t--){//多测。。。 cin>>s; int len=s.length(),sum=0;//取长度 记得length函数取出来之后比下标大一个 初始化sum for(int i=0;i<len;i++){//遍历 sum=((s[i]-'0')+sum*10)%2023;//取余+取位 } if(sum) cout<<"No"<<endl;//判断非零 else cout<<"Yes"<<endl; } return 0; }