C#
- voluntas
- @ignis_fatuus
- ブン
- @Linda_pp
- 清楚なC++メイドBOT
- @tzik_tack
- 長谷川一輝
- wraith13
- @jj1bdx
- @cpp_akira
- 安藤敏彦
- @srz_zumix
- Siv3D
- takezoh
- まろ
- @okdshin
- @hnokx
- @ishidakei
- @take_cheeze
- TAKEI Yuya
- @mumumu
- I (@wx257osn2)
- Tommy6
- @tyottyoworks
- ___shanon
- わたやん
- @KorekaraSEDB
- @kariya_mitsuru
- @ciniml
- @beam2d
- @grafi_tt
- @nekketsuuu
- LouiS0616
- @volanja
- 大鎌広
- むてら
- ガチKGB
- 三重野賢人
x
55
1
// This file is a "Hello, world!" in C# language by Mono for wandbox.2
using System;3
using System.Text;4
5
namespace Wandbox6
{7
class Fuga {8
public uint Position = 0;9
}10
11
class Hoge {12
private int cnt = 3;13
public byte ReadByte() => (byte)(cnt > 0 ? (cnt--) + '0' : 0);14
public readonly Fuga BaseStream = new Fuga();15
}16
17
class Program18
{19
static void Main(string[] args)20
{21
Hoge br = new Hoge();22
23
string filename = "";24
string filenamebin;25
byte c;26
27
while ((c = br.ReadByte()) != 0)28
{29
filename = filename + (char)c;30
}31
32
filenamebin = filename;33
34
StringBuilder sb = new StringBuilder();35
foreach (char L in filenamebin.ToCharArray())36
{37
sb.Append(Convert.ToString(L, 2).PadLeft(8, '0'));38
}39
40
string if_folder = sb.ToString();41
42
43
if (if_folder.Substring(0, 1) == "1")44
{45
if (br.BaseStream.Position % 4 != 0)46
{47
48
br.BaseStream.Position += (uint)(4 - (br.BaseStream.Position % 4));49
50
}51
}52
}53
}54
}55
$ mcs -out:prog.exe prog.cs
Start
0
Finish