1132 Cut Integer

#include<iostream>

using namespace std;

int main(){

int n,num;

cin>>n;

for(int i=0;i<n;i++){

cin>>num;

string s=to_string(num);

int len=s.length();

int a=stoi(s.substr(0,len/2));

int b=stoi(s.substr(len/2));

if(a*b!=0&&num%(a*b)==0){

cout<<"Yes"<<endl;

}else{

cout<<"No"<<endl;

}

}

return 0;

}

相关推荐
Cccp.1231 小时前
【leetcode】(七)前缀树和贪心算法
数据结构·leetcode·贪心算法
千里码aicood1 小时前
基于CART算法的图书分类系统设计与实现
数据库·算法·分类
码匠许师傅1 小时前
【C++三方组件】cpp-httplib:一个头文件起 HTTP 服务
开发语言·c++·http
做cv的小昊1 小时前
【World Model】π0.5:a Vision-Language-Action Model with Open-World Generalization
人工智能·算法·机器学习·大模型·多模态·vla·世界模型
لا معنى له2 小时前
World-In-World: World Models in a Closed-Loop World
算法
无名猿2 小时前
new/delete 与 malloc/free:为什么绝对不能混用
c++·内存管理·现代c++·踩坑记录
Logic1014 小时前
C语言/数据结构位运算题解:异或XOR找出多任务下载器中的“独特下载速度“——只出现一次的数字
c语言·数据结构·数组·位运算·时间复杂度·算法题·异或性质
2601_962218614 小时前
C++中decltype关键字的实现
开发语言·c++
Discipline10294 小时前
尼泊尔河流流量:天气驱动的预测与高流量风险
人工智能·算法