From 161fcf6aefc37d746535af9c0a081ac5f5787b12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=95=D0=B2=D0=B3=D0=B5=D0=BD=D0=B8=D0=B9?= Date: Thu, 25 Jun 2026 14:27:36 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D1=80=D0=B0=D0=BA=D1=82=D0=B8=D0=BA?= =?UTF-8?q?=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/TaskDemo.java | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/TaskDemo.java b/src/TaskDemo.java index 1cb5a1b..8474132 100644 --- a/src/TaskDemo.java +++ b/src/TaskDemo.java @@ -1,17 +1,16 @@ -import java.time.*; -import java.time.format.DateTimeFormatter; -import java.util.ArrayList; +import java.util.Scanner; public class TaskDemo { public static void main(String[] args) { - - ZoneId tokyoZone = ZoneId.of("Asia/Tokyo"); - - ZonedDateTime tokyoTime = ZonedDateTime.now(tokyoZone); - - DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); - String uiText = tokyoTime.format(formatter); - System.out.println("Точное время в Токио: " + uiText); + String[] color = {"FFFFFF", "000000", "E7495B", "333333"}; + System.out.println(findColor(color,"E7495B")); + } + public static boolean findColor(String[] pallete, String target) { + for (int i = 0; i < pallete.length; i++) { + if (pallete[i].equalsIgnoreCase(target)) { + return true; + } + } return false; } }