結果

問題 No.784 「,(カンマ)」
ユーザー _KingdomOfMoray_KingdomOfMoray
提出日時 2019-12-06 11:32:13
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 15 ms / 2,000 ms
コード長 280 bytes
コンパイル時間 320 ms
コンパイル使用メモリ 10,592 KB
実行使用メモリ 7,944 KB
最終ジャッジ日時 2023-08-24 19:48:40
合計ジャッジ時間 1,500 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,800 KB
testcase_01 AC 15 ms
7,856 KB
testcase_02 AC 15 ms
7,848 KB
testcase_03 AC 15 ms
7,876 KB
testcase_04 AC 15 ms
7,888 KB
testcase_05 AC 14 ms
7,832 KB
testcase_06 AC 14 ms
7,800 KB
testcase_07 AC 14 ms
7,792 KB
testcase_08 AC 15 ms
7,872 KB
testcase_09 AC 14 ms
7,944 KB
testcase_10 AC 15 ms
7,856 KB
testcase_11 AC 15 ms
7,852 KB
testcase_12 AC 14 ms
7,840 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = input()

listed_m = list(str(n))
listed_m.reverse()

list_buf = []

for i in range(len(listed_m)):
    if i % 3 == 0 and i != 0:
        list_buf.append(',')
    
    list_buf.append(listed_m[i])
        
list_res = list(reversed(list_buf))
res = ''.join(list_res)

print(res)
0