結果

問題 No.1472 作為の和
ユーザー 👑 tamatotamato
提出日時 2021-04-09 21:53:21
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 71 ms / 2,000 ms
コード長 797 bytes
コンパイル時間 306 ms
コンパイル使用メモリ 87,576 KB
実行使用メモリ 71,824 KB
最終ジャッジ日時 2023-09-07 10:59:17
合計ジャッジ時間 1,700 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,436 KB
testcase_01 AC 70 ms
71,676 KB
testcase_02 AC 70 ms
71,372 KB
testcase_03 AC 69 ms
71,448 KB
testcase_04 AC 71 ms
71,580 KB
testcase_05 AC 70 ms
71,664 KB
testcase_06 AC 71 ms
71,732 KB
testcase_07 AC 68 ms
71,404 KB
testcase_08 AC 71 ms
71,824 KB
testcase_09 AC 69 ms
71,696 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

mod = 1000000007
eps = 10**-9


def main():
    import sys
    from math import pi, floor
    input = sys.stdin.readline

    def f(N):
        ret = 0
        for n in str(N):
            ret += int(n)
        return ret

    """
    for i in range(1, 3):
        L = floor(pi * 10 ** i)
        ma = 0
        cnt = 0
        ab = (0, 0)
        for a in range(1, L+1):
            for b in range(a, L+1):
                fab = f(a*b)
                if fab > ma:
                    ma = fab
                    cnt = 1
                    ab = (a, b)
                elif fab == ma:
                    cnt += 1
        print(i, ma, cnt, ab)
    """

    N = int(input())
    if N == 0:
        print(9, 1)
    else:
        print(9 * (2*N + 1) - 1, 1)


if __name__ == '__main__':
    main()
0