Submission #19723836


Source Code Expand

Copy
//using AtCoder;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using static System.Console;
using static System.Linq.Enumerable;
using static System.Math;

public class Program
{
    public static void Main(string[] args)
    {
        //SourceExpander.Expander.Expand();

        var N = long.Parse(ReadLine());

        var ans = 0L;
        for (int m = 1; m <= Sqrt(N - 1); m++)
        {
            if (N % m == 0)
                ans += N / m - 1;
        }

        WriteLine(ans);
    }
}

static class ArrayDeconstructExtensions
{
    public static void Deconstruct<T>(this T[] a, out T i1, out T i2) => (i1, i2) = (a[0], a[1]);
    public static void Deconstruct<T>(this T[] a, out T i1, out T i2, out T i3) => (i1, i2, i3) = (a[0], a[1], a[2]);
    public static void Deconstruct<T>(this T[] a, out T i1, out T i2, out T i3, out T i4) => (i1, i2, i3, i4) = (a[0], a[1], a[2], a[3]);
    public static void Deconstruct<T>(this T[] a, out T i1, out T i2, out T i3, out T i4, out T i5) => (i1, i2, i3, i4, i5) = (a[0], a[1], a[2], a[3], a[4]);
}

Submission Info

Submission Time
Task D - DivRem Number
User flo
Language C# (.NET Core 3.1.201)
Score 0
Code Size 1137 Byte
Status WA
Exec Time 105 ms
Memory 27516 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 500
Status
AC × 2
AC × 23
WA × 2
Set Name Test Cases
Sample sample_01.txt, sample_02.txt
All hand_01.txt, hand_02.txt, hand_03.txt, rand_01.txt, rand_02.txt, rand_03.txt, rand_04.txt, rand_05.txt, rand_06.txt, rand_07.txt, rand_08.txt, rand_09.txt, rand_10.txt, rand_11.txt, rand_12.txt, rand_13.txt, rand_14.txt, rand_15.txt, rand_16.txt, rand_17.txt, rand_18.txt, rand_19.txt, rand_20.txt, sample_01.txt, sample_02.txt
Case Name Status Exec Time Memory
hand_01.txt AC 81 ms 27516 KB
hand_02.txt WA 81 ms 27212 KB
hand_03.txt AC 84 ms 27292 KB
rand_01.txt AC 94 ms 27448 KB
rand_02.txt AC 92 ms 27512 KB
rand_03.txt AC 87 ms 27136 KB
rand_04.txt AC 103 ms 27288 KB
rand_05.txt AC 96 ms 27204 KB
rand_06.txt AC 84 ms 27140 KB
rand_07.txt AC 86 ms 27128 KB
rand_08.txt AC 90 ms 27052 KB
rand_09.txt AC 83 ms 26980 KB
rand_10.txt AC 105 ms 27176 KB
rand_11.txt AC 84 ms 27100 KB
rand_12.txt AC 84 ms 27152 KB
rand_13.txt AC 83 ms 27044 KB
rand_14.txt AC 82 ms 27436 KB
rand_15.txt AC 80 ms 27056 KB
rand_16.txt AC 78 ms 26968 KB
rand_17.txt AC 93 ms 27120 KB
rand_18.txt WA 84 ms 27508 KB
rand_19.txt AC 80 ms 27208 KB
rand_20.txt AC 85 ms 27292 KB
sample_01.txt AC 79 ms 27148 KB
sample_02.txt AC 88 ms 27168 KB