結果
問題 | No.632 穴埋め門松列 |
ユーザー | No |
提出日時 | 2018-01-19 22:48:13 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 26 ms / 1,000 ms |
コード長 | 497 bytes |
コンパイル時間 | 937 ms |
コンパイル使用メモリ | 109,004 KB |
実行使用メモリ | 17,536 KB |
最終ジャッジ日時 | 2024-12-24 12:43:16 |
合計ジャッジ時間 | 1,573 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 6 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; namespace y { class Program { static void Main(string[] args) { string s = Console.ReadLine().Replace(" ",""); string a = s.Replace("?", "1"); string b = s.Replace("?", "4"); if ((a[0] < a[1] && a[1] > a[2]) || (a[0] > a[1] && a[1] < a[2])) Console.Write("1"); if ((b[0] < b[1] && b[1] > b[2]) || (b[0] > b[1] && b[1] < b[2])) Console.Write("4"); Console.WriteLine(); } } }