結果
| 問題 | No.188 HAPPY DAY |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-05-25 17:51:02 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 2,068 bytes |
| 記録 | |
| コンパイル時間 | 706 ms |
| コンパイル使用メモリ | 102,656 KB |
| 実行使用メモリ | 17,408 KB |
| 最終ジャッジ日時 | 2024-09-20 14:48:05 |
| 合計ジャッジ時間 | 1,055 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 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 a=0;
string b="";
int c = 0;
int d = 0;
int count = 0;
for (int i=1;i<=12;i++)
{
a = i;
if (a==1||a==3||a==5||a==7||a==8||a==10||a==12)
{
for (int j = 1; j <= 31; j++)
{
b = j.ToString();
c = int.Parse(b.Substring(0,1));
if (b.Length == 2)
{
d = int.Parse(b.Substring(1, 1));
}
if (a == c + d)
{
count++;
}
}
}
else if (a == 4||a==6||a==9||a==11)
{
for (int j = 1; j <= 30; j++)
{
b = j.ToString();
c = int.Parse(b.Substring(0, 1));
if (b.Length == 2)
{
d = int.Parse(b.Substring(1, 1));
}
if (a == c + d)
{
count++;
}
}
}
else if (a==2)
{
for (int j = 1; j <= 28; j++)
{
b = j.ToString();
c = int.Parse(b.Substring(0, 1));
if (b.Length == 2)
{
d = int.Parse(b.Substring(1, 1));
}
if (a == c + d)
{
count++;
}
}
}
}
Console.WriteLine(count);
}
}
}