結果
問題 | No.784 「,(カンマ)」 |
ユーザー |
![]() |
提出日時 | 2023-03-28 16:07:27 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 39 ms / 2,000 ms |
コード長 | 201 bytes |
コンパイル時間 | 335 ms |
コンパイル使用メモリ | 82,384 KB |
実行使用メモリ | 52,224 KB |
最終ジャッジ日時 | 2024-09-20 05:50:11 |
合計ジャッジ時間 | 1,370 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 10 |
ソースコード
N = list(input()) ans = [] cnt = 0 N.reverse() for n in N: ans.append(n) cnt += 1 if cnt % 3 == 0: ans.append(",") if ans[-1] == ",": ans.pop() ans.reverse() print(*ans, sep="")