結果

問題 No.2785 四乗足す四の末尾の0
ユーザー rin204rin204
提出日時 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
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
53,184 KB
testcase_01 AC 34 ms
52,124 KB
testcase_02 AC 37 ms
52,232 KB
testcase_03 AC 35 ms
52,512 KB
testcase_04 AC 35 ms
52,892 KB
testcase_05 AC 34 ms
52,688 KB
testcase_06 AC 34 ms
52,496 KB
testcase_07 AC 36 ms
52,940 KB
testcase_08 AC 35 ms
52,796 KB
testcase_09 AC 35 ms
52,832 KB
testcase_10 AC 37 ms
52,392 KB
testcase_11 AC 36 ms
52,068 KB
testcase_12 AC 36 ms
52,616 KB
testcase_13 AC 61 ms
67,796 KB
testcase_14 AC 113 ms
76,556 KB
testcase_15 AC 295 ms
76,276 KB
testcase_16 AC 39 ms
52,212 KB
testcase_17 AC 284 ms
76,676 KB
testcase_18 AC 273 ms
76,828 KB
testcase_19 AC 271 ms
76,292 KB
権限があれば一括ダウンロードができます

ソースコード

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