当前位置:网站首页>1091 N-Defensive Number (15 points)
1091 N-Defensive Number (15 points)
2022-08-11 07:47:00 【dumb bit】
题目要求:
代码:
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
//
for(int i = 0; i < n;i++) {
int num = scan.nextInt();
boolean flag = true;
for (int j = 1; j < 10; j++) {
String s = j * num * num + "";
//Determine if the input string ends
if (s.endsWith(num+"")){
System.out.println(j + " " + s);
flag = false;
break;
}
}
if (flag){
System.out.println("No");
}
}
}
}
结果:
边栏推荐
- 1071 小赌怡情 (15 分)
- easyrecovery15数据恢复软件收费吗?功能强大吗?
- 伦敦银规则有哪些?
- Tf中的平方,多次方,开方计算
- linux 安装mysql服务报错
- 为什么我使用C#操作MySQL进行中文查询失败
- Internet phone software or consolidation of attack must be "free" calls security clearance
- matplotlib
- Unity游戏排行榜的制作与优化
- When MySQL uses GROUP BY to group the query, the SELECT query field contains non-grouping fields
猜你喜欢
JD.com product details API call example explanation
PIXHAWK飞控使用RTK
从何跟踪伦敦金最新行情走势?
MySQL使用GROUP BY 分组查询时,SELECT 查询字段包含非分组字段
TF中的One-hot
Taobao product details API interface
【latex异常和错误】Missing $ inserted.<inserted text>You can‘t use \spacefactor in math mode.输出文本要注意特殊字符的转义
伦敦银规则有哪些?
1003 我要通过 (20 分)
When MySQL uses GROUP BY to group the query, the SELECT query field contains non-grouping fields
随机推荐
1051 复数乘法 (15 分)
Taobao product details API interface
线程交替输出(你能想出几种方法)
How Unity programmers can improve their abilities
常见激活函数及其导数
结合均线分析k线图的基本知识
2022-08-09 第四小组 修身课 学习笔记(every day)
Edge 提供了标签分组功能
从何跟踪伦敦金最新行情走势?
linux 安装mysql服务报错
计算YUV文件的PSNR与SSIM
NTT的Another Me技术助力创造歌舞伎演员中村狮童的数字孪生体,将在 “Cho Kabuki 2022 Powered by NTT”舞台剧中首次亮相
Production and optimization of Unity game leaderboards
易观分析联合中小银行联盟发布海南数字经济指数,敬请期待!
LeetCode刷题系列 -- 46. 全排列
软件测试主要做什么工作,难不难?
流式结构化数据计算语言的进化与新选择
从苹果、SpaceX等高科技企业的产品发布会看企业产品战略和敏捷开发的关系
1003 我要通过 (20 分)
技术分享 | 实战演练接口自动化如何处理 Form 请求?