結果

問題 No.2785 四乗足す四の末尾の0
ユーザー 👑 rin204
提出日時 2024-06-14 22:03:19
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 295 ms / 2,000 ms
コード長 261 bytes
コンパイル時間 487 ms
コンパイル使用メモリ 81,712 KB
実行使用メモリ 76,828 KB
最終ジャッジ日時 2024-06-14 22:03:22
合計ジャッジ時間 3,409 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

def solve(n):
    if n == 1:
        print("Yes")
    else:
        print("No")

    c = 0
    n %= 100
    x = n**4 + 4
    while x % 10 == 0:
        x //= 10
        c += 1

    print(c)


for _ in range(int(input())):
    n = int(input())
    solve(abs(n))
0