結果
| 問題 |
No.480 合計
|
| コンテスト | |
| ユーザー |
_matumo_
|
| 提出日時 | 2018-05-23 17:36:09 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 26 ms / 2,000 ms |
| コード長 | 10,599 bytes |
| コンパイル時間 | 4,310 ms |
| コンパイル使用メモリ | 109,676 KB |
| 実行使用メモリ | 26,668 KB |
| 最終ジャッジ日時 | 2024-06-28 16:18:40 |
| 合計ジャッジ時間 | 2,300 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 22 |
コンパイルメッセージ
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.Generic;
using System.Linq;
using System.Text;
namespace YukiCoder
{
class Program
{
static void Main(string[] args)
{
var va = Console.ReadLine();
int ia = int.Parse(va);
int sm = Enumerable.Range(1, ia).Sum();
Console.WriteLine(sm);
//Console.ReadLine();
////--------------------------------------------------------------//
//// PracticeA 問題-00 //
//// input a
//// b c
//// s
////- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - //
//var va = Console.ReadLine();
//var vb = Console.ReadLine().Split();
//int ia = int.Parse(va);
//int ib = int.Parse(vb[0]);
//int ic = int.Parse(vb[1]);
//string s = Console.ReadLine();
//Console.WriteLine( ia+ib+ic + "{0}",s);
//Console.ReadLine();
////- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - //
////--------------------------------------------------------------//
//// ABC086A 問題-01 //
//// //
////- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - //
//var va = Console.ReadLine().Split().Select(int.Parse).ToArray();
//Console.WriteLine(va[0] * va[1] % 2 == 0 ? "EVEN" : "ODD");
//Console.ReadLine();
////- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - //
////--------------------------------------------------------------//
//// ABC081A 問題-02 //
//// 1234111 ---> 4 //
////- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - //
//int n = Console.ReadLine().Count(c => c == '1');
//Console.WriteLine(n);
//Console.ReadLine();
////- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - //
////--------------------------------------------------------------//
//// ABC081B 問題-03 //
//// 12 16 32 ---> 2 //
////- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - //
//var va = Console.ReadLine().Split().Select(int.Parse);
//int n;
//for (n = 0; ; n++)
//{
// if (va.Any(x => x % 2 == 1)) break;
// va = va.Select(x => x / 2);
//}
//Console.WriteLine(n);
//Console.ReadLine();
////- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - //
////--------------------------------------------------------------//
//// ABC087B 問題-04 //
//// pi[4] = 10 10 10 1000 --->13 //
////- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - //
//var pi = Console.ReadLine().Split().Select(int.Parse).ToArray();
//var pz = from x in Enumerable.Range(0, pi[0] + 1)
// from y in Enumerable.Range(0, pi[1] + 1)
// from z in Enumerable.Range(0, pi[2] + 1)
// where (x * 500 + y * 100 + z * 50 == pi[3])
// select new { x, y, z };
//Console.WriteLine(pz.Count());
//pz.ToList().ForEach(p => Console.WriteLine(" 500*" + p.x + " 100*" + p.y + " 50*" + p.z));
//Console.ReadLine();
////- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - //
////--------------------------------------------------------------//
//// xxxxxxx // "1234" ---> 10
////- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - //
//int n = Console.ReadLine().Sum(c => c -'0');
//Console.WriteLine(n);
//Console.ReadLine();
////- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - //
////--------------------------------------------------------------//
//// ABC083B 問題-05 //
//// 20 2 5 ---> 84 //
////- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - //
//var pa = Console.ReadLine().Split().Select(int.Parse).ToArray();
//int N = pa[0];
//int A = pa[1];
//int B = pa[2];
//int sum = 0;
//int n;
//for (int i = 1; i <= N; i++)
//{
// n = i.ToString().Sum(c => c - '0');
// if (n >= A && n <= B) sum += i;
//}
//Console.WriteLine(sum);
//Console.ReadLine();
////- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - //
////--------------------------------------------------------------//
//// ABC088B 問題-06 //
//// 3/2 7 4/ ---> 5 //
////- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - //
//var pa = Console.ReadLine();
//var pb = Console.ReadLine().Split().Select(int.Parse).OrderByDescending(x => x);
//var sum0 = pb.Where((x, i) => i % 2 == 0).Sum();
//var sum1 = pb.Where((x, i) => i % 2 == 1).Sum();
//Console.WriteLine(sum0 - sum1);
//Console.ReadLine();
////- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - //
////--------------------------------------------------------------//
//// ABC085B 問題-07 //
//// 8 10 8 6 ---> 3 //
////- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - //
//var pa = Console.ReadLine();
//var pb = Console.ReadLine().Split().Select(int.Parse).Distinct();
//Console.WriteLine(pb.Count());
//Console.ReadLine();
////- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - //
////--------------------------------------------------------------//
//// ABC085C 問題-08 //
//// N枚 Y円 //
////- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - //
//var pb = Console.ReadLine().Split().Select(int.Parse).ToList();
//int N = pb[0];
//int Y = pb[1];
//int iMax = Math.Min(N, Y / 10000);
//for (int i = 0; i <= iMax; i++)
//{
// int jMax = Math.Min(N - i, (Y - iMax * 10000) / 5000);
// for (int j = 0; j <= jMax; j++)
// {
// int k = (Y - i * 10000 - j * 5000) / 1000;
// if (i + j + k <= N)
// {
// Console.WriteLine("i, j, k = " + i + ", " + j + ", " + k);
// }
// }
//}
//Console.ReadLine();
////- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - //
////////////////////////////////////////////////////////////////////
////--------------------------------------------------------------//
//// ABC049C 問題-09 //
////- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - //
//string S = "dreameraser@";
//test(S);
////////////////////////////////////////////////////////////////////
////- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - //
//int[] pn = new int[] { 1, 2, 3, 4, 10, 20, 30, 50, 15 };
//int n = pn.Count();
//int nLMax = 0;
//int nL;
////- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - //
//Console.WriteLine(n);
//Console.WriteLine(string.Join(" ", pn));
////- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - //
//var pa = pn.OrderBy(x => x).ToList();
//for (int i = 0; i < n - 2; i++)
//{
// for (int j = i + 1; j < n - 1; j++)
// {
// for (int k = j + 1; k < n; k++)
// {
// if (pa[i] + pa[j] > pa[k])
// {
// nL = pa[i] + pa[j] + pa[k];
// if (nL > nLMax) nLMax = nL;
// }
// }
// }
//}
////- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - //
//Console.WriteLine(nLMax);
//Console.ReadLine();
}
////////////////////////////////////////////////////////////////////////////// 問題-09
//////--------------------------------------------------------------//
////// ABC049C 問題-09 //
//////- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - //
//static string[] ps = new string[] { "dream", "dreamer", "erase", "eraser" };
//static bool test(string SSS)
//{
// if (SSS == "@") return true;
// foreach (string s in ps)
// {
// if (SSS.StartsWith(s))
// {
// if (test(SSS.Substring(s.Length)))
// {
// Console.WriteLine(s);
// return true;
// }
// }
// }
// return false;
//}
//////--------------------------------------------------------------//
//////////////////////////////////////////////////////////////////////////////
}
}
_matumo_