結果
| 問題 |
No.289 数字を全て足そう
|
| コンテスト | |
| ユーザー |
taka_ltd
|
| 提出日時 | 2020-06-09 21:15:53 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 32 ms / 1,000 ms |
| コード長 | 666 bytes |
| コンパイル時間 | 2,647 ms |
| コンパイル使用メモリ | 104,000 KB |
| 実行使用メモリ | 22,272 KB |
| 最終ジャッジ日時 | 2025-01-02 19:41:37 |
| 合計ジャッジ時間 | 2,917 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
using System.Collections.Concurrent;
using System.ComponentModel;
namespace yukicoder3
{
class Program
{
static void Main(string[] args)
{
string input = Console.ReadLine();
int ans = 0;
for (int A = 0; A < input.Length; A++)
{
for (int B = 0; B <= 9; B++)
{
if (input[A].ToString() == B.ToString())
{
ans += int.Parse(input[A].ToString());
}
}
}
Console.WriteLine(ans);
}
}
}
taka_ltd