1132 Cut Integer (20 分)【难度: 简单 / 知识点: 模拟】
https://pintia.cn/problem-sets/994805342720868352/problems/994805347145859072
就是简单的模拟即可。
#include<bits/stdc++.h>
using namespace std;
bool solve(string s)
{int len=s.size();int a=stoi(s.substr(0,len/2));int b=stoi(s.substr(len/2));int sum=stoi(s);if(a*b==0) return false;if(sum%(a*b)) return false;return true;
}
int main(void)
{int t; cin>>t;while(t--){string s; cin>>s;if(solve(s)) puts("Yes");else puts("No");}return 0;
}
1132 Cut Integer (20 分)【难度: 简单 / 知识点: 模拟】相关推荐
- 13. 找出数组中重复的数字【难度: 简单 / 知识点: 模拟】
13. 找出数组中重复的数字[难度: 简单 / 知识点: 模拟] 方法一: map 计数 时间复杂度O(nlongn) 空间复杂度多了一个二叉树 class Solution {public:int ...
- 1152 Google Recruitment (20 分)【难度: 简单 / 知识点: 模拟】
https://pintia.cn/problem-sets/994805342720868352/problems/1071785055080476672 #include<bits/stdc ...
- 1088 Rational Arithmetic (20 分)【难度: 简单 / 知识点: 模拟】
https://pintia.cn/problem-sets/994805342720868352/problems/994805378443755520 PAT乙级的原题,直接模拟即可 #inclu ...
- 1008 Elevator (20 分)【难度: 简单 / 知识点: 模拟】
https://pintia.cn/problem-sets/994805342720868352/problems/994805511923286016 直接模拟即可. #include<bi ...
- 1001 A+B Format (20 分)【难度: 简单 / 知识点: 模拟】
https://pintia.cn/problem-sets/994805342720868352/problems/994805528788582400 方法一: #include<bits/ ...
- 1047 Student List for Course (25 分)【难度: 简单 / 知识点: 模拟】
https://pintia.cn/problem-sets/994805342720868352/problems/994805433955368960 注意用scanf 和 printf 不然会T ...
- 1009 Product of Polynomials (25 分)【难度: 简单 / 知识点: 模拟】
https://pintia.cn/problem-sets/994805342720868352/problems/994805509540921344 注意:系数数据范围虽然是0-1000 但是乘 ...
- PAT甲级1132 Cut Integer:[C++题解]
文章目录 题目分析 题目来源 题目分析 来源:acwing 分析:使用string读入,然后stoi转换成int型. ac代码 #include<bits/stdc++.h> using ...
- 1054 The Dominant Color (20 分)【难度: 简单 / 知识点: 思维】
https://pintia.cn/problem-sets/994805342720868352/problems/994805422639136768 因为数量多于一半,故排序后中间必为答案. # ...
最新文章
- Java反射最佳实践
- 数字时代职业生涯规划
- ASP.NET2.0 ObjectDataSource的使用详解(1)
- linux java程序控制台日志输出
- 磁盘使用分析器linux,ncdu:基于ncurses库的磁盘使用分析器
- array用法 numpy_python--numpy(3)
- css3位移过度效果,详解Css3新特性应用之过渡与动画
- UVALive - 7267 Mysterious Antiques in Sackler Museum
- 计算机科学技术专业词汇,计算机专业一些单词
- UOS设置屏幕缩放后的配置文件研究
- 【转载】六合一调试神器TTL转USB模块
- 计算机出现假桌面怎么解决办法,win10桌面因为AppHangXProcB1一直出现假死的有效修复技巧...
- select下拉框如何显示提示语,不要出现下拉选项中
- flash人物原地走路_flash如何做人物走路
- Solidity Integer Overflow and Underflow
- rknn3399pro 2小时入门指南(八)详细教程指导你一步到位训练得到yolov3 rknn模型
- 检测ip和port是否可连接
- 计算机电缆的表示方式,各种电缆型号的表示方法
- ACL’21 | 对话系统也要进军多模态了!
- 家常土豆泥饼制作方法步骤图解
热门文章
- Pandas matplotlib 无法显示中文 Ubuntu16.04
- jquery iCheck 插件
- nginx发布antd-pro项目(别人发的,未测试)
- BZOJ2301: [HAOI2011]Problem b
- Spark Streaming简介
- Effective java -- 2 对于所有对象都通用到方法
- extjs4:代码实现comboBox选中事件
- 递归遍历文件夹,并添加到TreeView控件中
- WebBrowser页面与WinForm交互技巧
- 基于visual c++之windows核心编程代码分析(64)现有的exe文件中添加自己的代码