QOJ.ac

QOJ

Time Limit: 2 s Memory Limit: 256 MB Total points: 100

#22409. زوجي؟ فردي؟

Statistics

كلفت معلمة Bessie القاسية في الصف الثاني Bessie بقائمة من $N$ ($1 \le N \le 100$) عدد صحيح موجب $I$ ($1 \le I \le 10^{60}$)، يجب عليها تحديد زوجيتها (ويُشرح ذلك في الصف الثاني بعبارة «زوجي... أم فردي؟»). تشعر Bessie بالعجز أمام طول القائمة وكبر الأعداد. فهي لم تتعلم العد إلا مؤخرًا.

اكتب برنامجًا يقرأ الأعداد الصحيحة الـ $N$ ويطبع even في سطر منفصل للأعداد الزوجية، وبالمثل odd للأعداد الفردية.

الإدخال

  • السطر 1: عدد صحيح واحد، $N$.
  • الأسطر $2..N+1$: يحتوي السطر $j+1$ على $I_{j}$، وهو العدد الصحيح رقم $j$ المطلوب تحديد زوجيته.

الإخراج

  • الأسطر $1..N$: يحتوي السطر $j$ على الكلمة even أو odd، وفق زوجية $I_{j}$.

أمثلة

الإدخال 1

2
1024
5931

الإخراج 1

even
odd

ملاحظة

عددان صحيحان: 1024 و5931.

1024 يقبل القسمة على 2 بوضوح؛ أما 5931 فلا.

المهام الفرعية

النقاط: 25

مؤلف المسألة: Rob Kolstad، 2009

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.