blob: a0533551d8f3bc55c45fe93650b1ea3f650f2553 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#!python
#
# Perl Weekly Challenge 254
# Task 1
#
# See <https://perlweeklychallenge.org/blog/perl-weekly-challenge-254>
#
import sys
import math
# task implementation
# the return value will be printed
def task_1( args ):
num = int( args[ 0 ] )
for i in range( 2, int( math.sqrt( num ) ) ):
if ( i ** 3 ) == num:
return True
return False
# invoke the main without the command itself
if __name__ == '__main__':
print( task_1( sys.argv[ 1: ] ) )
|