提出 #1827384
ソースコード 拡げる
using System;
class ABC080B
{
static public void Main(string[] args)
{
int N = int.Parse(Console.ReadLine());
if(N % f(N) == 0)
Console.WriteLine("Yes");
else
Console.WriteLine("No");
}
static int f(int n)
{
int ret = 0;
while(n > 0)
{
ret += n % 10;
n /= 10;
}
return ret;
}
}
提出情報
| 提出日時 | |
|---|---|
| 問題 | B - Harshad Number |
| ユーザ | hogeki |
| 言語 | C# (Mono 4.6.2.0) |
| 得点 | 200 |
| コード長 | 340 Byte |
| 結果 | AC |
| 実行時間 | 20 ms |
| メモリ | 13140 KiB |
ジャッジ結果
| セット名 | Sample | All | ||||
|---|---|---|---|---|---|---|
| 得点 / 配点 | 0 / 0 | 200 / 200 | ||||
| 結果 |
|
|
| セット名 | テストケース |
|---|---|
| Sample | sample_01.txt, sample_02.txt, sample_03.txt |
| All | 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt, sample_01.txt, sample_02.txt, sample_03.txt |
| ケース名 | 結果 | 実行時間 | メモリ |
|---|---|---|---|
| 01.txt | AC | 20 ms | 11092 KiB |
| 02.txt | AC | 20 ms | 13140 KiB |
| 03.txt | AC | 19 ms | 11092 KiB |
| 04.txt | AC | 20 ms | 13140 KiB |
| 05.txt | AC | 20 ms | 11092 KiB |
| 06.txt | AC | 19 ms | 9044 KiB |
| 07.txt | AC | 20 ms | 11092 KiB |
| 08.txt | AC | 19 ms | 9044 KiB |
| 09.txt | AC | 20 ms | 11092 KiB |
| 10.txt | AC | 19 ms | 9044 KiB |
| sample_01.txt | AC | 19 ms | 11092 KiB |
| sample_02.txt | AC | 19 ms | 9044 KiB |
| sample_03.txt | AC | 19 ms | 9044 KiB |