結果
問題 | No.8043 yukicoderへようこそ! |
ユーザー |
![]() |
提出日時 | 2021-01-14 23:39:39 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 27 ms / 2,000 ms |
コード長 | 1,222 bytes |
コンパイル時間 | 2,142 ms |
コンパイル使用メモリ | 114,432 KB |
実行使用メモリ | 19,072 KB |
最終ジャッジ日時 | 2024-11-24 18:45:49 |
合計ジャッジ時間 | 2,973 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 6 |
コンパイルメッセージ
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; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Numerics; using System.Text; using System.Text.RegularExpressions; using System.Threading.Tasks; using static System.Math; public static class P { public static void Main() { var line = Console.ReadLine(); int n; if (!int.TryParse(line, out n)) { if (char.IsDigit(line[0])) Console.WriteLine($"{line.Split().Select(int.Parse).Sum()} {Console.ReadLine()}"); else Console.WriteLine("Hello World!"); return; } if (n == 51) { for (int i = 1; i <= n; i++) { string res = ""; if (i % 3 == 0) res += "Fizz"; if (i % 5 == 0) res += "Buzz"; if (res.Length == 0) res = i.ToString(); Console.WriteLine(res); } return; } if (n == 96) { Console.WriteLine(n * (n + 1) / 2); return; } Console.WriteLine(Console.In.ReadToEnd().Split().Where(x => x.Length != 0).Select(long.Parse).Sum()); } }