結果
| 問題 |
No.299 蟻本が読めない
|
| コンテスト | |
| ユーザー |
astatine0x55
|
| 提出日時 | 2016-11-24 18:26:58 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 2,006 bytes |
| コンパイル時間 | 2,340 ms |
| コンパイル使用メモリ | 115,128 KB |
| 実行使用メモリ | 25,424 KB |
| 最終ジャッジ日時 | 2024-11-27 10:36:24 |
| 合計ジャッジ時間 | 2,346 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 2 WA * 1 RE * 1 |
コンパイルメッセージ
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 static System.Console;
using static System.Math;
using static ConsoleApplication.Utils;
namespace ConsoleApplication
{
public class Program
{
public static void Main(string[] args)
{
var n = ReadInt();
WriteLine((n-1) * 52 + 316);
}
}
public static class Utils
{
#region Extensions for IO
public static int ReadInt()
=> ReadLine().ToInt();
public static IEnumerable<int> ReadInts()
=> ReadStrings().Select(int.Parse);
public static IEnumerable<string> ReadStrings()
=> ReadLine().Split(' ');
public static IEnumerable<string> ReadLines(int n)
{
foreach (var i in Enumerable.Range(0, n))
{
yield return ReadLine();
}
}
#endregion
#region Extensions of int
public static bool IsOdd(this int n)
=> !n.IsEven();
public static bool IsEven(this int n)
=> n % 2 == 0;
public static bool CanDivideWith(this int n, int divisor)
=> n % divisor == 0;
#endregion
#region Extensions of string
public static int ToInt(this string str)
=> int.Parse(str);
public static long ToLong(this string str)
=> long.Parse(str);
public static bool IsNullOrEmpty(this string str)
=> string.IsNullOrEmpty(str);
#endregion
public static void ForEach<T>(this IEnumerable<T> source, Action<T> action)
{
foreach (var item in source)
{
action(item);
}
}
public static IEnumerable<T> Peek<T>(this IEnumerable<T> source, Action<T> action)
{
foreach (var item in source)
{
action(item);
}
return source;
}
}
}
astatine0x55