码迷,mamicode.com
首页 > 编程语言 > 详细

python3 练习题100例 (十七)四位车号问题

时间:2018-11-28 12:18:08      阅读:119      评论:0      收藏:0      [点我收藏+]

标签:print   问题   author   for   alt   info   range   imp   div   

技术分享图片

#!/usr/bin/env python3
# -*- coding: utf-8 -*-

__author__ = Fan Lijun

import math

for i in range(1000, 10000):
    n, m = str(math.sqrt(i)).split(.)
    if m == 0 and i//1000 == int(str(i)[1]) and i % 10 == int(str(i)[-2]):
        print(i)

 

python3 练习题100例 (十七)四位车号问题

标签:print   问题   author   for   alt   info   range   imp   div   

原文地址:https://www.cnblogs.com/LoveBeautiful/p/10030307.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!