結果
| 問題 |
No.841 8/32
|
| コンテスト | |
| ユーザー |
ose20
|
| 提出日時 | 2021-02-12 22:50:34 |
| 言語 | TypeScript (5.7.2) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 560 bytes |
| コンパイル時間 | 8,225 ms |
| コンパイル使用メモリ | 228,224 KB |
| 実行使用メモリ | 41,324 KB |
| 最終ジャッジ日時 | 2024-12-31 16:23:48 |
| 合計ジャッジ時間 | 10,039 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 2 |
| other | AC * 20 WA * 1 |
ソースコード
import * as fs from 'fs';
const input = fs.readFileSync('/dev/stdin', 'utf8');
const arr = input.split(' ');
let S1 = arr[0];
let S2 = arr[1];
function is_holiday (day : string) : boolean {
return day === "Sat" || day === "Sun"
}
// まず、「S1 が Sat か Sun である」かどうかで場合わけ
if (is_holiday(S1)) {
// S1 が Sat か Sun である場合の記述
if (is_holiday(S2)) {
console.log("8/33");
}
else {
console.log("8/32");
}
}
else {
// S1 が Sat でも Sun でもない場合の記述
console.log("8/31");
}
ose20