####準備
[C#でAtCoderデビューのための準備]
(https://qiita.com/azumabashi/items/7aa9e4b77c10970cc30a)
のあとで AtCoder Beginners Selection をやってみました。
####問題文
ABC083B - Some Sums
[https://atcoder.jp/contests/abs/tasks/abc083_b]
(https://atcoder.jp/contests/abs/tasks/abc083_b)
####提出結果
using System;
class Program
{
static void Main(string[] args)
{
string[] input = Console.ReadLine().Split(' ');
int n = int.Parse(input[0]);
int a = int.Parse(input[1]);
int b = int.Parse(input[2]);
int souwa = 0;
for (int i = 1; i <= n; i++)
{
// 強引だけれど結果オーライ
int i10000 = i / 10000;
int i1000 = (i % 10000) / 1000;
int i100 = (i % 1000) / 100;
int i10 = (i % 100) / 10;
int i1 = i % 10;
int wa = i10000 + i1000 + i100 + i10 + i1;
if ((wa >= a) && (wa <= b))
{
souwa += i;
}
}
Console.WriteLine($"{souwa}");
}
}