fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. class Ideone
  9. {
  10. public static void main (String[] args) throws java.lang.Exception
  11. {
  12. // your code goes here
  13. }
  14. }
Success #stdin #stdout 0.09s 52456KB
stdin
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover, user-scalable=no">
    <title>传奇霸业 · Boss计时器</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            user-select: none;
            -webkit-tap-highlight-color: transparent;
        }
        body {
            background: radial-gradient(circle at 20% 10%, #0a0502 0%, #010000 100%);
            min-height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            font-family: 'Segoe UI', 'Poppins', 'Orbitron', monospace;
            padding: 16px;
        }
        .boss-app {
            max-width: 680px;
            width: 100%;
            background: rgba(3, 2, 0, 0.85);
            backdrop-filter: blur(20px);
            border-radius: 72px;
            border: 1.5px solid rgba(212, 175, 55, 0.85);
            box-shadow: 0 40px 50px rgba(0,0,0,0.7), 0 0 0 3px rgba(212,175,55,0.25) inset, 0 0 40px rgba(212,175,55,0.4);
            padding: 24px 20px 36px;
            text-align: center;
        }
        .title-area h1 {
            font-size: 2.5rem;
            letter-spacing: 5px;
            background: linear-gradient(145deg, #f9e6b3, #e6bc5c, #fad48c);
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
            font-weight: 900;
        }
        .title-area .subtitle {
            color: #daa742;
            font-size: 0.7rem;
            letter-spacing: 2.5px;
            border-top: 1px solid #c9913a;
            display: inline-block;
            margin-top: 8px;
            padding: 5px 18px;
        }
        .boss-badge {
            display: flex;
            justify-content: center;
            gap: 14px;
            margin: 18px 0 12px;
            flex-wrap: wrap;
        }
        .boss-badge span {
            background: #1e180b;
            border-radius: 60px;
            padding: 6px 22px;
            font-weight: bold;
            font-size: 0.85rem;
            color: #f2cf7a;
            border: 1px solid #ecc459;
            box-shadow: 0 0 8px rgba(212,175,55,0.6);
        }
        .boss-title {
            font-size: 1.9rem;
            font-weight: 800;
            background: linear-gradient(135deg, #f3da94, #c4933f);
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
            margin: 6px 0 5px;
        }
        .timer-sanctum {
            background: #030100e0;
            border-radius: 70px;
            padding: 22px 12px;
            margin: 16px 0 18px;
            border: 1px solid #f5cf7a;
            box-shadow: 0 0 28px rgba(212,175,55,0.65), inset 0 0 8px #000;
        }
        #timerDisplay {
            font-family: 'Orbitron', monospace;
            font-size: 3.2rem;
            font-weight: 800;
            letter-spacing: 5px;
            color: #fff0bd;
            text-shadow: 0 0 16px #f0a500, 0 0 6px #ffcf7e;
            display: flex;
            justify-content: center;
            align-items: baseline;
            gap: 10px;
            flex-wrap: wrap;
        }
        .time-unit {
            font-size: 1rem;
            background: #2a2317b3;
            padding: 0 10px;
            border-radius: 50px;
            font-weight: 600;
            color: #f3ce7c;
        }
        .message-area {
            background: #1b150980;
            border-radius: 48px;
            padding: 12px 18px;
            margin: 12px 0 14px;
            font-size: 0.88rem;
            color: #f2cd7c;
            border-left: 3px solid #f7cf74;
            border-right: 3px solid #f7cf74;
        }
        .button-group {
            display: flex;
            gap: 14px;
            justify-content: center;
            flex-wrap: wrap;
            margin: 18px 0 16px;
        }
        .btn {
            background: #241e10;
            border: 1px solid #ddb652;
            color: #fbe6a2;
            font-weight: bold;
            font-size: 0.9rem;
            padding: 10px 22px;
            border-radius: 60px;
            cursor: pointer;
            backdrop-filter: blur(4px);
            transition: 0.08s linear;
            box-shadow: 0 3px 6px black;
        }
        .btn:active {
            transform: scale(0.96);
            background: #3c311b;
            box-shadow: 0 0 12px #f5bc4e;
        }
        .btn-gold {
            background: #b67d32;
            color: #1f1707;
            border-color: #ffe0a3;
            font-weight: 800;
        }
        .custom-panel {
            background: #0c0904a0;
            border-radius: 60px;
            padding: 12px 16px;
            margin-top: 14px;
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            justify-content: center;
            gap: 12px;
        }
        .custom-panel input {
            background: #1e190d;
            border: 1px solid #cd9f44;
            padding: 9px 14px;
            border-radius: 48px;
            color: #ffeaad;
            font-family: monospace;
            font-size: 0.85rem;
            width: 195px;
            text-align: center;
            outline: none;
        }
        .status-badge {
            font-size: 0.7rem;
            background: #241f12;
            display: inline-block;
            padding: 5px 20px;
            border-radius: 32px;
            margin-top: 14px;
            color: #d6aa4a;
        }
        footer {
            font-size: 0.6rem;
            color: #8e743c;
            margin-top: 22px;
            padding-top: 12px;
            border-top: 0.5px solid #bf953f55;
        }
        @media (max-width: 520px) {
            #timerDisplay { font-size: 2.2rem; }
            .btn { padding: 7px 16px; font-size: 0.8rem; }
            .boss-title { font-size: 1.5rem; }
            .title-area h1 { font-size: 2rem; }
        }
        .shine { animation: raidFlash 0.4s ease-out; }
        @keyframes raidFlash {
            0% { text-shadow: 0 0 0 gold; background-color: #2f2816; }
            50% { text-shadow: 0 0 20px #ffcc44; background-color: #4a3b1e; }
        }
    </style>
</head>
<body>
<div class="boss-app">
    <div class="title-area">
        <h1>⚔️ 传奇霸业 ⚔️</h1>
        <div class="subtitle">◆ 霸主之瞳 · 世界BOSS计时器 ◆</div>
    </div>
    <div class="boss-badge">
        <span>🐉 魔龙霸主</span>
        <span>👑 祖玛教皇</span>
        <span>🔥 赤炎魔君</span>
    </div>
    <div class="boss-title">★ 远古·霸业之主 ★</div>
    <div class="timer-sanctum">
        <div id="timerDisplay">-- 时 -- 分 -- 秒</div>
    </div>
    <div class="message-area" id="infoMessage">🕹️ 世界BOSS精准倒计时 | 召集兄弟,刀刀暴击</div>
    <div class="button-group">
        <button class="btn btn-gold" id="refreshNowBtn">⚡ 立即刷新</button>
        <button class="btn" id="resetDefaultBtn">🔄 重置时间</button>
        <button class="btn" id="addHourBtn">⏩ +1小时</button>
        <button class="btn" id="subHourBtn">⏪ -1小时</button>
    </div>
    <div class="custom-panel">
        <span style="color:#efc36b;">📅 自定义BOSS时间</span>
        <input type="datetime-local" id="bossDateTime" value="2026-04-01T10:00">
        <button class="btn" id="setCustomBtn" style="padding: 6px 16px;">⚙️ 设定</button>
    </div>
    <div class="status-badge" id="targetStatus">🎯 当前目标: 2026/04/01 10:00:00</div>
    <footer>🛡️ 传奇霸业 · 官方辅助 | 倒计时精确至秒,备战夺宝攻沙</footer>
</div>
<script>
    let bossTimestamp = new Date(2026, 3, 1, 10, 0, 0).getTime();
    let timerInterval = null;
    const timerDisplayDiv = document.getElementById("timerDisplay");
    const infoMsgDiv = document.getElementById("infoMessage");
    const targetStatusSpan = document.getElementById("targetStatus");
    const dateTimePicker = document.getElementById("bossDateTime");

    function getTimeParts(diffMs) {
        if (diffMs <= 0) return null;
        const totalSec = Math.floor(diffMs / 1000);
        return {
            hours: Math.floor(totalSec / 3600),
            minutes: Math.floor((totalSec % 3600) / 60),
            seconds: totalSec % 60
        };
    }

    function updateStatusText() {
        const d = new Date(bossTimestamp);
        const y = d.getFullYear(), m = String(d.getMonth()+1).padStart(2,'0'), day = String(d.getDate()).padStart(2,'0');
        const h = String(d.getHours()).padStart(2,'0'), min = String(d.getMinutes()).padStart(2,'0'), sec = String(d.getSeconds()).padStart(2,'0');
        targetStatusSpan.innerHTML = `🎯 当前目标: ${y}/${m}/${day} ${h}:${min}:${sec}`;
        const isoLocal = `${y}-${m}-${day}T${h}:${min}`;
        if (dateTimePicker.value !== isoLocal) dateTimePicker.value = isoLocal;
    }

    function renderCountdown() {
        const diff = bossTimestamp - Date.now();
        if (diff <= 0) {
            timerDisplayDiv.innerHTML = `<span style="font-size:2.4rem;">🔥 霸主降临·速攻 🔥</span>`;
            infoMsgDiv.innerHTML = "⚠️ 传说BOSS已现世!集结行会,击杀得神装!⚠️";
            infoMsgDiv.style.color = "#ffcc66";
            return;
        }
        const parts = getTimeParts(diff);
        if (parts) {
            timerDisplayDiv.innerHTML = `<span>${parts.hours}</span><span class="time-unit">时</span><span>${parts.minutes}</span><span class="time-unit">分</span><span>${parts.seconds}</span><span class="time-unit">秒</span>`;
        }
        if (diff < 300000) infoMsgDiv.innerHTML = "💢 紧急军情!BOSS 5分钟内刷新!全员备战! 💢";
        else if (diff < 1800000) infoMsgDiv.innerHTML = "⚔️ 血战前夕!BOSS即将现世,检查装备药品!⚔️";
        else if (diff < 3600000) infoMsgDiv.innerHTML = "⏰ 黄金备战时段!蹲守BOSS,抢夺首杀奖励!";
        else infoMsgDiv.innerHTML = "🐉 霸业之巅,准时蹲伏BOSS,史诗掉落等你拿!";
        infoMsgDiv.style.color = "#f2cd7c";
    }

    function fullUIUpdate() { renderCountdown(); updateStatusText(); }

    function setNewBossTime(ts) {
        if (isNaN(ts)) return;
        const now = Date.now();
        if (ts < now - 86400000) ts = now + 7200000;
        bossTimestamp = ts;
        fullUIUpdate();
        document.querySelector(".timer-sanctum")?.classList.add("shine");
        setTimeout(() => document.querySelector(".timer-sanctum")?.classList.remove("shine"), 400);
    }

    function resetToDefault() { setNewBossTime(new Date(2026, 3, 1, 10, 0, 0).getTime()); infoMsgDiv.innerHTML = "✅ 已重置官方刷新时间"; }
    function triggerInstantRefresh() { setNewBossTime(Date.now() - 1000); infoMsgDiv.innerHTML = "⚡ 霸业之主已降临!勇士们速速集结!⚡"; }
    function addOneHour() { let nt = bossTimestamp + 3600000; if (bossTimestamp < Date.now() && nt < Date.now()) nt = Date.now() + 3600000; setNewBossTime(nt); infoMsgDiv.innerHTML = "⏰ Boss时间推迟 +1 小时"; }
    function subOneHour() { let nt = bossTimestamp - 3600000; if (nt < Date.now() - 86400000) nt = Date.now() + 1800000; setNewBossTime(nt); infoMsgDiv.innerHTML = "⏪ Boss时间提前 -1 小时"; }
    function setCustomDateTime() {
        let val = dateTimePicker.value;
        if (!val) return;
        let d = new Date(val);
        if (isNaN(d.getTime())) return;
        d.setSeconds(0);
        if (d.getTime() <= Date.now() && !confirm("设定时间≤当前时间,BOSS将立即降临,是否继续?")) return;
        setNewBossTime(d.getTime());
        infoMsgDiv.innerHTML = `⚙️ 已设定: ${d.toLocaleString()}`;
    }

    function init() {
        setNewBossTime(new Date(2026, 3, 1, 10, 0, 0).getTime());
        if (timerInterval) clearInterval(timerInterval);
        timerInterval = setInterval(fullUIUpdate, 1000);
        document.getElementById("refreshNowBtn").onclick = triggerInstantRefresh;
        document.getElementById("resetDefaultBtn").onclick = resetToDefault;
        document.getElementById("addHourBtn").onclick = addOneHour;
        document.getElementById("subHourBtn").onclick = subOneHour;
        document.getElementById("setCustomBtn").onclick = setCustomDateTime;
    }
    init();
    window.addEventListener("beforeunload", () => { if (timerInterval) clearInterval(timerInterval); });
</script>
</body>
</html>
stdout
Standard output is empty