結果
問題 |
No.2088 数当てゲーム
|
ユーザー |
|
提出日時 | 2022-09-30 21:46:36 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 552 bytes |
コンパイル時間 | 2,260 ms |
コンパイル使用メモリ | 110,192 KB |
実行使用メモリ | 25,932 KB |
最終ジャッジ日時 | 2024-12-22 23:14:21 |
合計ジャッジ時間 | 5,333 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 6 WA * 15 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; using static System.Console; using System.Linq; using System.Collections.Generic; class Program { static long NN => long.Parse(ReadLine()); static void Main() { Solve(); } static void Solve() { var a = NN; var b = NN; if (a == 0 || b == 0) { WriteLine(0); } else { var n = Math.Abs(b / a); if (a > 0) n = -n; if (b < 0) n = -n; WriteLine(n); } } }