{"id":23272354,"url":"https://github.com/letsdeepchat/recursive-digit-sum-problem-using-java","last_synced_at":"2026-02-20T21:03:45.667Z","repository":{"id":153852890,"uuid":"441686301","full_name":"letsdeepchat/Recursive-Digit-Sum-Problem-using-Java","owner":"letsdeepchat","description":"Recursive Digit Sum Problem We define super digit of an integer n using the following rules: Given an integer, we need to find the super digit of the integer n. If n has only 1 digit, then its super digit is n. Otherwise, the super digit of n is equal to the super digit of the sum of the digits of n.  superDigit has the following parameter(s):  string n: a string representation of an integer int k: the times to concatenate n to make p.  Input The first line contains two space separated integers, n and k.  Constraints: 1 \u003c= n \u003c= 10^100000 1 \u003c= k \u003c= 100000  Output In a new line, print the the super digit of n repeated k times.  Example Input: 148 3 Output: 3 Explanation: Here n=148 and k=3 , so p=148148148.  super_digit(p) = super_digit(148148148)                 = super_digit(1+4+8+1+4+8+1+4+8)                = super_digit(39)                = super_digit(3+9)                = super_digit(12)                = super_digit(1+2)                = super_digit(3)                = 3","archived":false,"fork":false,"pushed_at":"2021-12-25T13:40:00.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-12T15:40:48.958Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/letsdeepchat.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-12-25T13:37:10.000Z","updated_at":"2021-12-25T13:40:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"8eef6121-8406-48c9-96ba-7d5a814fae48","html_url":"https://github.com/letsdeepchat/Recursive-Digit-Sum-Problem-using-Java","commit_stats":null,"previous_names":["letsdeepchat/recursive-digit-sum-problem-using-java"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/letsdeepchat%2FRecursive-Digit-Sum-Problem-using-Java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/letsdeepchat%2FRecursive-Digit-Sum-Problem-using-Java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/letsdeepchat%2FRecursive-Digit-Sum-Problem-using-Java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/letsdeepchat%2FRecursive-Digit-Sum-Problem-using-Java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/letsdeepchat","download_url":"https://codeload.github.com/letsdeepchat/Recursive-Digit-Sum-Problem-using-Java/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247463933,"owners_count":20942950,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-19T19:14:54.243Z","updated_at":"2025-10-23T20:11:42.561Z","avatar_url":"https://github.com/letsdeepchat.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Recursive-Digit-Sum-Problem-using-Java\nRecursive Digit Sum Problem\nWe define super digit of an integer n using the following rules:\nGiven an integer, we need to find the super digit of the integer n.\nIf n has only 1 digit, then its super digit is n.\nOtherwise, the super digit of n is equal to the super digit of the sum of the digits of n.\n\nsuperDigit has the following parameter(s):\n\nstring n: a string representation of an integer\nint k: the times to concatenate n to make p.\n\nInput\nThe first line contains two space separated integers, n and k.\n\nConstraints:\n1 \u003c= n \u003c= 10^100000\n1 \u003c= k \u003c= 100000\n\nOutput\nIn a new line, print the the super digit of n repeated k times.\n\nExample\nInput:\n148 3\nOutput:\n3\nExplanation:\nHere n=148 and k=3 , so p=148148148.\n\nsuper_digit(p) = super_digit(148148148) \n               = super_digit(1+4+8+1+4+8+1+4+8)\n               = super_digit(39)\n               = super_digit(3+9)\n               = super_digit(12)\n               = super_digit(1+2)\n               = super_digit(3)\n               = 3\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fletsdeepchat%2Frecursive-digit-sum-problem-using-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fletsdeepchat%2Frecursive-digit-sum-problem-using-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fletsdeepchat%2Frecursive-digit-sum-problem-using-java/lists"}