結果

問題 No.888 約数の総和
ユーザー mame_shibemame_shibe
提出日時 2019-12-05 19:25:46
言語 C#(csc)
(csc 3.9.0)
結果
RE  
実行時間 -
コード長 712 bytes
コンパイル時間 1,264 ms
コンパイル使用メモリ 62,972 KB
実行使用メモリ 24,152 KB
最終ジャッジ日時 2023-08-23 12:26:29
合計ジャッジ時間 7,170 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 56 ms
20,588 KB
testcase_01 AC 56 ms
22,716 KB
testcase_02 AC 57 ms
20,788 KB
testcase_03 AC 56 ms
20,836 KB
testcase_04 AC 56 ms
18,544 KB
testcase_05 AC 56 ms
18,692 KB
testcase_06 AC 56 ms
20,660 KB
testcase_07 AC 56 ms
22,700 KB
testcase_08 AC 56 ms
20,676 KB
testcase_09 AC 56 ms
18,572 KB
testcase_10 AC 56 ms
18,748 KB
testcase_11 AC 58 ms
22,780 KB
testcase_12 AC 57 ms
20,664 KB
testcase_13 AC 58 ms
20,724 KB
testcase_14 AC 58 ms
22,712 KB
testcase_15 AC 59 ms
20,780 KB
testcase_16 AC 59 ms
18,728 KB
testcase_17 AC 60 ms
22,620 KB
testcase_18 RE -
testcase_19 RE -
testcase_20 RE -
testcase_21 RE -
testcase_22 RE -
testcase_23 TLE -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

using System;
using System.Text;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization.Formatters;
using static System.Console;
using static System.Math;

namespace YukiCoder
{
    public class Program
    {
        public static void Main(string[] args)
        {
            new Program().Solve();
        }

        public void Solve()
        {
            int n = int.Parse(ReadLine());

            int sum = 0;
            for (int i = 1; i <= n; i++)
            {
                if (n % i == 0)
                {
                    sum += i;
                }
            }
            
            WriteLine(sum);
        }
        
    }
}
0