Submission #23995831


Source Code Expand

package main

import "fmt"

func main() {
	var p int
	fmt.Scan(&p)

	res := 0
	i := 2

	for {
		res += p % i
		p /= i
		i++
		if p == 0 {
			break
		}
	}

	fmt.Println(res)
}

Submission Info

Submission Time
Task B - Factorial Yen Coin
User solareenlo
Language Go (1.14.1)
Score 200
Code Size 195 Byte
Status AC
Exec Time 6 ms
Memory 1768 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 3
AC × 10
Set Name Test Cases
Sample sample_00.txt, sample_01.txt, sample_02.txt
All max_00.txt, min_00.txt, random_00.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, sample_00.txt, sample_01.txt, sample_02.txt
Case Name Status Exec Time Memory
max_00.txt AC 6 ms 1768 KiB
min_00.txt AC 2 ms 1752 KiB
random_00.txt AC 2 ms 1752 KiB
random_01.txt AC 1 ms 1768 KiB
random_02.txt AC 2 ms 1748 KiB
random_03.txt AC 1 ms 1752 KiB
random_04.txt AC 1 ms 1752 KiB
sample_00.txt AC 2 ms 1768 KiB
sample_01.txt AC 1 ms 1768 KiB
sample_02.txt AC 2 ms 1768 KiB