結果

問題 No.2785 四乗足す四の末尾の0
ユーザー shimonohnishishimonohnishi
提出日時 2024-06-14 21:57:19
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 285 bytes
コンパイル時間 427 ms
コンパイル使用メモリ 82,464 KB
実行使用メモリ 76,628 KB
最終ジャッジ日時 2024-06-14 21:57:23
合計ジャッジ時間 2,927 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 7 WA * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

T = int(input())
for _ in range(T):
    N = int(input())
    print('Yes' if abs(N) == 1 else 'No')
    a = (N - 1)**2 + 1
    b = (N + 1)**2 + 1
    res = 0
    while a % 10 == 0:
        a //= 10
        res += 1
    while b % 10 == 0:
        b //= 10
        res += 1
    print(res)
0