結果
| 問題 | No.188 HAPPY DAY |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-05-27 13:38:29 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 21 ms / 1,000 ms |
| コード長 | 1,459 bytes |
| コンパイル時間 | 841 ms |
| コンパイル使用メモリ | 106,440 KB |
| 実行使用メモリ | 25,560 KB |
| 最終ジャッジ日時 | 2024-09-20 15:13:53 |
| 合計ジャッジ時間 | 1,046 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 1 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
namespace yukicoder
{
class Program
{
static void Main(string[] args)
{
int ans30 = 0;
int ans31 = 0;
int ans28 = 0;
int ans = 0;
//月31日まで
for(int i=0;i<=3;i++)
{
for (int j = 0; j <= 9; j++)
{
ans = i + j;
if (ans == 1 || ans == 3 || ans == 5 || ans == 7 || ans == 8 || ans == 10)
{
ans31++;
}
if (i == 3 && j < 1)
{
break;
}
}
}
//月30日まで
for(int i=0;i<=2;i++)
{
for(int j=0;j<=9;j++)
{
ans = i + j;
if(ans==4||ans==6||ans==9||ans==11)
{
ans30++;
}
}
}
//月28日まで
for(int i=0;i<=2;i++)
{
for(int j=0;j<=8;j++)
{
ans = i + j;
if(ans==2)
{
ans28++;
}
}
}
Console.WriteLine(ans31+ans30+ans28);
}
}
}