結果

問題 No.784 「,(カンマ)」
ユーザー otsunekootsuneko
提出日時 2021-05-07 19:15:25
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 74 ms / 2,000 ms
コード長 187 bytes
コンパイル時間 262 ms
コンパイル使用メモリ 87,328 KB
実行使用メモリ 71,592 KB
最終ジャッジ日時 2023-10-13 10:20:47
合計ジャッジ時間 1,999 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,280 KB
testcase_01 AC 70 ms
71,456 KB
testcase_02 AC 70 ms
71,592 KB
testcase_03 AC 70 ms
71,296 KB
testcase_04 AC 74 ms
71,400 KB
testcase_05 AC 71 ms
71,296 KB
testcase_06 AC 71 ms
71,444 KB
testcase_07 AC 71 ms
71,280 KB
testcase_08 AC 72 ms
71,320 KB
testcase_09 AC 72 ms
71,300 KB
testcase_10 AC 73 ms
71,592 KB
testcase_11 AC 74 ms
71,348 KB
testcase_12 AC 72 ms
71,452 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = input()

l = len(N)
ans = ""
for i in range(l):
    if i not in [0,l-1] and (l-i)%3 == 0:
        ans += ","
        ans += N[i]
    else:
        ans += N[i]
print(ans)    
0