結果
問題 | No.2297 Best Grouping |
ユーザー |
|
提出日時 | 2023-05-13 17:48:41 |
言語 | JavaScript (node v23.5.0) |
結果 |
AC
|
実行時間 | 67 ms / 2,000 ms |
コード長 | 278 bytes |
コンパイル時間 | 83 ms |
コンパイル使用メモリ | 7,076 KB |
実行使用メモリ | 39,296 KB |
最終ジャッジ日時 | 2024-11-29 09:36:05 |
合計ジャッジ時間 | 4,141 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 20 |
ソースコード
'use strict'; const main = (input) => { const N = input.trim(); const 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'));