' "" "" "'" " '" "" "" "'" "" ' "" "" ""' "" ' ""' "" " '" "" "" "" "" "'" "" "" "" "" ' "" "" "" "" "'" "" "" " '" ""' "" "" "" "" ' "" "" "" ""' "" "" "" "" ' "" "" "" ""' "" "" "" "" ' "" "" "" ""' "" "" "" "" ' "" """ "" " '" "" "" "" "'" "" "" "" " '" "" "" "" "'" "" "" "" " '" "" "" "" " ' "" "" "" ""' "" "" "" "" ' "" "" "" ""' "" "" "" "" ' "" "" "" ""' "" "" "" "" ' "" "" "" ""' "" "" "" "" ' "" "" "" ""' "" "" "" "" ' "" "" """ " '" "" "" "" "'" "" "" "" " '" "" "" "" "'" "" "" "" " '" "" "" "" "'" "" "" "" " '" "" "" "" "'" "" "" "" " '" "" "" "" "'" "" "" "" " '" "" "" " "" ' "" "" "" ""' "" "" "" "" ' "" "" "" ""' "" "" "" "" ' "" "" "" "" '" "" "" "" "'" "" "" "" " '" "" "" "" "'" "" "" "" " '" "" "" "" "'" "" "" "" " '" "" "" "" "'" "" "" "" " '" "" "" "" "'" "" "" "" " '" "" "" "" " ' "" "" "" ""' "" "" "" "" ' "" "" "" ""' "" "" "" "" ' "" "" "" ""'"" "" "" "" ' "" "" "" ""' "" "" "" "" ' "" "" "" ""' "" "" "" "" ' "" "" " "" " '" "" "" "" "'" "" "" "" " '" "" "" "" "'" "" "" "" ' "" "'" "" "" "" "" ' "" "" ""' "" " '" "" "" "" "'" "" "" "" " '" "" "" "" "'" "" """" " '" "" "" ""' "" " '" "" "" "" ""' "" "" "" ' "" "'" "" "" "" " '" "" " "" "" ' "" "" "" ""' "" "" "" "" ' "" "" "" "'" "" ' "" "" "" "" "'" "" "" " '" ""' "" "" "" "" ' "" "" "" ""' "" "" "" "" ' "" "" "" ""' "" """" "" ' "" "" "" ""' "" "" "" " '" ""' "" "" "" "" " '" "" "" "'" "" ' "" " "" "" " '" "" "" "" "'" "" "" "" " '" "" "" "" "'" "" "" "" " '" "" "" "" " ' "" "" "" "'" "" ' "" "" "" "" "'" "" "" " '" ""' "" "" "" "" ' "" """ "" " '" "" "" "" "'" "" "" "" " '" "" "" "" "'" "" "" "" " '" "" "" "" " ' "" "" "" ""' "" "" "" "" ' "" "" "" ""' "" "" "" "" ' "" "" "" ""' "" "" "" " '" ""' "" "" "" "" " '" "" "" "'" "" ' "" "" "" ""' "" "" "" ""' "" "" "" ""' "" "" "" "" ' "" "" "" "'" "" ' "" "" "" "" "'" "" "" " '" " " '" "" "" "" "'" "" "" "" " '" "" "" "" "'" "" "" "" " '" "" "" ""' "" " ' "" "" "" "" " '" "" "" "'" "" ' "" "" "" ""' "" "" "" "" ' "" "" "" "" '" "" "" "" "'" "" "" "" " '" "" "" "" "'" "" "" "" ' "" "'" "" "" "" "" ' "" "" "" ""' "" "" "" "" ' "" "" "" ""' "" "" "" "" ' "" "" "" ""' "" "" "" "" ' "" "" "" "'" "" ' "" "" "" ""' "" " '" ""' "" " '" ""' "" " '"" " '" ""' "" " '" ""' "" " '" ""' "" "" "" "" " '" "'" " '" "'" " '" "" " "" ' ""' "" " '" "" "" "" "'" "" "" "" ' ""' "" " '"' "" "" "" " '" "'" " ' "" " '" "" "" "'" " '" ""' "" ' "" "" "" "'" " '" ""' "" "" ' "'" "" """" ' ""' "" ' "" "'" "" "" " '" "'" "" ' "" "" "" ""' "" "
ব্যাখ্যা
এই প্রোগ্রামটি সিউডোকোডের সমান:
while (cp = (ch = read)) + 1 {
(
(cp -= 65) ? // A
(cp -= 4) ? // E
(cp -= 4) ? // I
(cp -= 6) ? // O
(cp -= 6) ? // U
(cp -= 12) ? // a
(cp -= 4) ? // e
(cp -= 4) ? // i
(cp -= 6) ? // o
(cp - 6) ? // u
0
: 1
: 1
: 1
: 1
: 1
: 1
: 1
: 1
: 1
: 1
) ? ((--vs)+4) ? print(ch) : (++vs) : {
print(ch)
vs = 0
}
}
নিম্নলিখিত পরিবর্তনশীল অ্যাসাইনমেন্ট সহ:
0 (unused) (13 bytes)
1 cp ( 4 bytes; occurs 20× in the code)
2 vs ( 7 bytes; occurs 5× in the code)
3 ch (10 bytes; occurs 3× in the code)
আপনি দেখতে পাচ্ছেন, আমি পরিবর্তনশীল স্লট 0 এড়িয়ে চলেছি কারণ 0
লেখার জন্য এত দীর্ঘ ধ্রুবক।
সুতরাং আমরা প্রতিটি অক্ষর পড়া এবং উভয় মান সংরক্ষণ cp
এবং ch
। আমরা সংশোধন করব cp
তবে ch
চারপাশে রাখব যাতে প্রয়োজন হলে আমরা এটি মুদ্রণ করতে পারি। আমরা cp
ASCII- এর সম্ভাব্য 10 স্বর অক্ষরের প্রত্যেকটি কিনা তা পরীক্ষা করার জন্য ক্রমাগতভাবে 65, 4, 4, 6, ইত্যাদি বিয়োগ করব (নোট করুন, শেষের কোনওটি অ্যাসাইনমেন্ট হওয়ার দরকার নেই)।
vs
এখনও সর্বমোট 3 টি স্বর ছাপার অনুমতি দেওয়া স্বরের চেয়ে কম থাকে। এটি শুরু হয় 0
, সুতরাং 3 স্বর মুদ্রণ করা যায়। এটি পৌঁছে গেলে -3
, আমরা স্বরগুলি মুদ্রণ বন্ধ করি।
যদি আমাদের কোনও স্ব-স্বর (স্থান সহ) মুখোমুখি হয় , তবে আমরা print(ch)
তারপরে সম্পাদন করব vs = 0
। আপনি সম্ভবত অনুমান করেছেন, এটি স্বর পাল্টা পুনরায় সেট করে।
যদি আমরা একটি স্বর মুখোমুখি হয় , আমরা কার্যকর ((--vs)+4) ? print(ch) : (++vs)
। আসুন এটি ভেঙে দিন:
- হ্রাস
vs
;
- যদি মান এখন
-4
, আমরা খুব বেশী দূরে চলে করেছি, তাই কিছু প্রিন্ট না, কিন্তু বৃদ্ধি vs
ফিরে -3
তাই আমরা হবে অবিরত স্বরবর্ণ প্রিন্ট করতে প্রত্যাখ্যান করার;
- অন্যথায়, অক্ষর মুদ্রণ করুন।
aaYYAAaaaAERGH
।