結果
| 問題 | No.1129 Rating じゃんけん |
| ユーザー |
bluemegane
|
| 提出日時 | 2021-04-18 10:33:10 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 25 ms / 2,000 ms |
| コード長 | 764 bytes |
| 記録 | |
| コンパイル時間 | 847 ms |
| コンパイル使用メモリ | 103,808 KB |
| 実行使用メモリ | 18,176 KB |
| 最終ジャッジ日時 | 2024-07-04 04:25:22 |
| 合計ジャッジ時間 | 1,981 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 16 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
public class Hello
{
public static int a, b, c, d;
static void Main()
{
string[] line = Console.ReadLine().Trim().Split(' ');
a = int.Parse(line[0]);
b = int.Parse(line[1]);
c = int.Parse(line[2]);
d = int.Parse(line[3]);
var w = getAns();
string ans;
if (w == 1) ans = "null";
else if (w == -1) ans = "tRue";
else ans = "Draw";
Console.WriteLine(ans);
}
static int getAns()
{
if (a > c) return 1;
else if (a < c) return -1;
else
{
if (b == d) return 0;
else if ((b == 0 && d == 1) | (b == 1 && d == 2) | (b == 2 && d == 0)) return 1;
else return -1;
}
}
}
bluemegane