結果
| 問題 |
No.188 HAPPY DAY
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-01-16 02:27:45 |
| 言語 | Rust (1.83.0 + proconio) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 964 bytes |
| コンパイル時間 | 12,970 ms |
| コンパイル使用メモリ | 385,608 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2025-01-16 02:28:00 |
| 合計ジャッジ時間 | 13,155 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 1 |
ソースコード
#![allow(unused_imports)]
#![allow(non_snake_case)]
use proconio::input;
use proconio::marker::*;
use std::cmp::*;
use std::collections::*;
fn main() {
let month = 12;
let day1 = 9;
let day2 = 3;
let ans = solve(month, day1, day2);
println!("{}", ans)
}
fn solve(M: usize, D1: usize, D2: usize) -> usize {
let mut count = 0;
for i in 1..=M {
for j in 0..=D2 {
if i == 2 && j > 2 {
continue;
}
for k in 0..=D1 {
if j == 0 && k == 0 {
continue;
} else if k > 0 {
if j == 3 {
if i == 4 || i == 6 || i == 9 || i == 11 {
continue;
} else {
if k > 1 {
continue;
}
}
} else if j == 2 {
if i == 2 {
if k > 8 {
continue;
}
}
}
}
if j + k == i {
println!("{} + {} = {}", j, k, i);
count += 1;
}
}
}
}
count
}