結果

問題 No.1461 しあはせや歩みゆく?
ユーザー bluemegane
提出日時 2021-04-02 22:37:22
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 26 ms / 2,000 ms
コード長 311 bytes
コンパイル時間 703 ms
コンパイル使用メモリ 107,160 KB
実行使用メモリ 26,184 KB
最終ジャッジ日時 2024-12-23 20:20:19
合計ジャッジ時間 2,496 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 34
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

public class Hello
{
    static void Main()
    {
        var n = long.Parse(Console.ReadLine().Trim());
        getAns(n);
    }
    static void getAns(long n)
    {
        if (n < 3) { Console.WriteLine(n); return; }
        var ans = (n - 3) * 5L + 3;
        Console.WriteLine(ans);
    }
}
0