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