結果
問題 | No.676 C0nvertPr0b1em |
ユーザー |
|
提出日時 | 2020-06-16 13:25:19 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 26 ms / 2,000 ms |
コード長 | 610 bytes |
コンパイル時間 | 835 ms |
コンパイル使用メモリ | 111,812 KB |
実行使用メモリ | 26,812 KB |
最終ジャッジ日時 | 2024-07-03 11:51:06 |
合計ジャッジ時間 | 2,591 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 30 |
コンパイルメッセージ
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; namespace _0676 { class Program { static void Main(string[] args) { var s = Console.ReadLine().Trim(); var a = new char[s.Length]; for(var i = 0; i < s.Length; i++){ if(s[i] == 'I' || s[i] == 'l'){ a[i] = '1'; }else if(s[i] == 'O' || s[i] == 'o'){ a[i] = '0'; }else{ a[i] = s[i]; } } Console.WriteLine(string.Join("",a.Select(x => x.ToString()))); } } }