結果

問題 No.2785 四乗足す四の末尾の0
ユーザー 👑 Nachia
提出日時 2024-06-14 21:39:53
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 664 ms / 2,000 ms
コード長 247 bytes
コンパイル時間 235 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-06-14 21:39:58
合計ジャッジ時間 4,288 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

T = int(input())
for t in range(T):
	n = abs(int(input()))
	if n == 1:
		print('Yes\n0', flush=False)
	elif (n**4+4)%10 != 0:
		print('No\n0', flush=False)
	elif (n**4+4)%100 != 0:
		print('No\n1', flush=False)
	else:
		print('No\n2', flush=False)
0