結果
問題 | No.1893 Cycle |
ユーザー | Fullmoon8507 |
提出日時 | 2022-09-24 14:55:48 |
言語 | JavaScript (node v23.5.0) |
結果 |
AC
|
実行時間 | 64 ms / 2,000 ms |
コード長 | 573 bytes |
コンパイル時間 | 227 ms |
コンパイル使用メモリ | 5,504 KB |
実行使用メモリ | 39,424 KB |
最終ジャッジ日時 | 2024-12-22 05:57:09 |
合計ジャッジ時間 | 2,500 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 |
ソースコード
function Main(input) { 'use strict'; let data = input.split("\n"); let first_line = data[0].split(" "); let second_line = data[1]; let x = parseInt(first_line[0]); let y = parseInt(first_line[1]); let z = addCorrect(x+4); if (z === y) { console.log(addCorrect(z+4)); } else { console.log(z); } } function addCorrect(num){ let buf = num + 4; if (12 <= buf) { return buf -= 12; } else { return buf; } } // Don't edit this line! Main(require("fs").readFileSync("/dev/stdin", "utf8"));