結果
| 問題 | No.784 「,(カンマ)」 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-06-10 20:00:57 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
AC
|
| 実行時間 | 92 ms / 2,000 ms |
| コード長 | 352 bytes |
| 記録 | |
| コンパイル時間 | 327 ms |
| コンパイル使用メモリ | 20,784 KB |
| 実行使用メモリ | 15,360 KB |
| 最終ジャッジ日時 | 2026-04-21 09:06:48 |
| 合計ジャッジ時間 | 2,373 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 |
ソースコード
def printNum (lst, i):
for x in range(1, len(lst)+1):
if (x-1) % 3 == i and (x-1) != 0:
print(",{}".format(lst[x-1]), end="")
else:
print(lst[x-1], end="")
print("")
if __name__ == '__main__':
n = list(input())
l = len(n)
if l <= 3:
printNum(n, 0)
else:
printNum(n, l % 3)