結果
| 問題 |
No.1446 ハンバーグと納豆ごはん
|
| コンテスト | |
| ユーザー |
AAAAAA
|
| 提出日時 | 2021-03-31 15:38:27 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 898 bytes |
| コンパイル時間 | 3,347 ms |
| コンパイル使用メモリ | 103,296 KB |
| 実行使用メモリ | 34,304 KB |
| 最終ジャッジ日時 | 2024-12-15 00:41:28 |
| 合計ジャッジ時間 | 17,264 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | AC * 6 WA * 23 TLE * 4 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp188
{
class Program
{
static void Main(string[] args)
{
string[] str = (Console.ReadLine().Split());
long a=long.Parse(str[0]);
long b = long.Parse(str[1]);
long n = long.Parse(str[2]);
long m = long.Parse(str[3]);
long e = 0;
if (a / n >= b )
{
while (a - e*n >= b + e)
{
e += 1;
}
Console.WriteLine(a - e * n);
}
else
{
while (b - e * m >= a + e)
{
e += 1;
}
Console.WriteLine(b - e * m);
}
}
}
}
AAAAAA