|
@@ -1,22 +1,15 @@
|
|
-#!/usr/bin/env python3
|
|
|
|
-# -*- coding: utf-8 -*-
|
|
|
|
-"""
|
|
|
|
-@Copyright (C) ansjer cop Video Technology Co.,Ltd.All rights reserved.
|
|
|
|
-@AUTHOR: ASJRD018
|
|
|
|
-@NAME: AnsjerFormal
|
|
|
|
-@software: PyCharm
|
|
|
|
-@DATE: 2019/1/3 16:46
|
|
|
|
-@Version: python3.6
|
|
|
|
-@MODIFY DECORD:ansjer dev
|
|
|
|
-@file: spnsss.py
|
|
|
|
-@Contact: chanjunkai@163.com
|
|
|
|
-"""
|
|
|
|
import time
|
|
import time
|
|
-daytime= '2019012117'
|
|
|
|
-timeArray = time.strptime(daytime, "%Y%m%d%H %z")
|
|
|
|
-# daytime= '2019012117'
|
|
|
|
-# timeArray = time.strptime(daytime, "%Y%m%d%H")
|
|
|
|
-print(timeArray)
|
|
|
|
-startTime = time.mktime(timeArray)
|
|
|
|
-print(startTime)
|
|
|
|
-# 1548061200
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+# a+b+c=1000,且 a2+b2=c^2
|
|
|
|
+start_time = time.time()
|
|
|
|
+print(start_time)
|
|
|
|
+for a in range(0, 1001):
|
|
|
|
+ for b in range(0, 1001):
|
|
|
|
+ c = 1000-a-b
|
|
|
|
+ if a ** 2 + b ** 2 == c ** 2:
|
|
|
|
+ print("a,b,c:%d,%d,%d" % (a, b, c))
|
|
|
|
+
|
|
|
|
+end_time = time.time()
|
|
|
|
+print("elapsed:%f" % (end_time-start_time))
|
|
|
|
+print("complete")
|