結果
問題 | No.480 合計 |
ユーザー |
![]() |
提出日時 | 2020-09-18 19:56:34 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 26 ms / 2,000 ms |
コード長 | 909 bytes |
コンパイル時間 | 3,856 ms |
コンパイル使用メモリ | 113,724 KB |
実行使用メモリ | 26,136 KB |
最終ジャッジ日時 | 2024-06-22 08:08:15 |
合計ジャッジ時間 | 4,430 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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;using System.Threading.Tasks;namespace ConsoleApp3 {class Program {static void Main(string[] args) {var scanner = new Scanner();int N = scanner.NextInt();int sum = 0;for (int i = 1; i <= N; i++) {sum += i;}Console.WriteLine(sum);}}class Scanner {int index = 0;string[] tokens = { };public string Next() {if (index == tokens.Length) {index = 0;tokens = Console.ReadLine().Split(' ');}return tokens[index++];}public int NextInt() {return int.Parse(Next());}public long NextLong() {return long.Parse(Next());}}}