結果

問題 No.889 素数!
ユーザー StarMatyan
提出日時 2020-11-15 16:14:17
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 32 ms / 2,000 ms
コード長 746 bytes
コンパイル時間 86 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-07-23 01:16:01
合計ジャッジ時間 3,533 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 61
権限があれば一括ダウンロードができます

ソースコード

diff #

intstr = int(input())
handan = 0
result = 0
result_s=""

heihonum = 8
ripponum = 4

if intstr >=2:
	while heihonum > 0:
		if int(intstr) == int(heihonum*heihonum):
			result_s = "Heihosu!"
			handan = 1
		heihonum = heihonum - 1

	while ripponum > 0:
		if int(intstr) == int(ripponum*ripponum*ripponum):
			result_s = "Ripposu!"
			handan = 2
		ripponum = ripponum - 1

	if intstr ==6 or intstr ==28:
		result_s = "Kanzensu!"
		handan = 3
	
	if intstr ==2 or intstr ==3 or intstr ==5 or intstr ==7:
		result_s = "Sosu!"
		handan = 4	

	if intstr%2 > 0 and intstr%3>0 and intstr%5>0 and intstr%7>0:
		result_s = "Sosu!"
		handan = 4	

	if handan == 0:
		result = intstr
else:
	result = intstr


if handan > 0:
	print(result_s)
else:
	print(result)
0