Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class Sheets
- {
- static void Main()
- {
- int pieces = int.Parse(Console.ReadLine());
- for (int sheetSize = 0, piesePerSheet = 1024; sheetSize <= 10; sheetSize++, piesePerSheet /= 2)
- {
- if (pieces - piesePerSheet >= 0)
- {
- pieces = pieces - piesePerSheet;
- }
- else
- {
- Console.WriteLine("A{0}", sheetSize);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement