Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
32700 | 23级李京宁 | 【J】2023 | C++ | 通过 | 100 | 7 MS | 492 KB | 750 | 2024-09-26 22:32:34 |
#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; }