結果
| 問題 |
No.149 碁石の移動
|
| コンテスト | |
| ユーザー |
pirorirori_n712
|
| 提出日時 | 2018-09-25 20:53:58 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 25 ms / 2,000 ms |
| コード長 | 600 bytes |
| コンパイル時間 | 773 ms |
| コンパイル使用メモリ | 115,500 KB |
| 実行使用メモリ | 27,500 KB |
| 最終ジャッジ日時 | 2024-10-05 18:57:13 |
| 合計ジャッジ時間 | 1,725 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 13 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
using System.Linq;
class No149{
static void Main(){
var a=Console.ReadLine().Split(' ').Select(x=>Int32.Parse(x)).ToArray();
var b=Console.ReadLine().Split(' ').Select(x=>Int32.Parse(x)).ToArray();
var move=Console.ReadLine().Split(' ').Select(x=>Int32.Parse(x)).ToArray();
var move1=a[1]-move[0];
if(move1<0){
a[0]+=move1;
b[0]-=move1;
}
var move2=b[0]-move[1];
if(move2>-1){
a[0]+=move[1];
}else{
a[0]+=b[0];
}
Console.WriteLine(a[0]);
}
}
pirorirori_n712