[過去ログ]
ふらっと C#,C♯,C#(初心者用) Part141 (1002レス)
ふらっと C#,C♯,C#(初心者用) Part141 http://mevius.5ch.net/test/read.cgi/tech/1544839627/
上
下
前
次
1-
新
通常表示
512バイト分割
レス栞
このスレッドは過去ログ倉庫に格納されています。
次スレ検索
歴削→次スレ
栞削→次スレ
過去ログメニュー
148: デフォルトの名無しさん (ワッチョイ 658a-6UAB) [] 2018/12/26(水) 06:18:38.10 ID:1oivSykz0 課題で10進数を2進数の文字列に変換したいのですが、これだとびっくりすくらい遅いです。 速くするにはどうしたらいいでしょうか。 class Program { public static void Main(string[] args) { string input = Console.ReadLine(); int i = Convert.ToInt32(input); string output = ""; while(i >= 1) { output = output.Insert(0,(i % 2).ToString()); i >>= 1; } Console.WriteLine(output); Console.ReadLine(); } } http://mevius.5ch.net/test/read.cgi/tech/1544839627/148
メモ帳
(0/65535文字)
上
下
前
次
1-
新
書
関
写
板
覧
索
設
栞
歴
あと 854 レスあります
スレ情報
赤レス抽出
画像レス抽出
歴の未読スレ
AAサムネイル
Google検索
Wikipedia
ぬこの手
ぬこTOP
0.019s