結果
問題 |
No.2297 Best Grouping
|
ユーザー |
|
提出日時 | 2023-05-13 17:43:35 |
言語 | JavaScript (node v23.5.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 278 bytes |
コンパイル時間 | 103 ms |
コンパイル使用メモリ | 5,248 KB |
実行使用メモリ | 39,424 KB |
最終ジャッジ日時 | 2024-11-29 09:30:22 |
合計ジャッジ時間 | 4,733 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 WA * 1 |
other | AC * 11 WA * 9 |
ソースコード
'use strict'; const main = (input) => { const [N] = input.trim(); let num = Number(N); if (num % 3 === 0) { console.log(0); } else if (num % 3 === 2) { console.log(1); } else { console.log(2); } }; main(require('fs').readFileSync('/dev/stdin', 'utf8'));