結果
| 問題 | No.314 ケンケンパ |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-08-01 13:00:07 |
| 言語 | Rust (1.94.0 + proconio + num + itertools) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 405 bytes |
| 記録 | |
| コンパイル時間 | 2,054 ms |
| コンパイル使用メモリ | 191,840 KB |
| 実行使用メモリ | 15,104 KB |
| 最終ジャッジ日時 | 2026-04-03 19:20:09 |
| 合計ジャッジ時間 | 6,220 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 3 |
| other | TLE * 1 -- * 16 |
コンパイルメッセージ
warning: unused imports: `BTreeSet`, `HashMap`, and `hash::Hash`
--> src/main.rs:2:19
|
2 | collections::{BTreeSet, HashMap},
| ^^^^^^^^ ^^^^^^^
3 | hash::Hash,
| ^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default
ソースコード
use std::{
collections::{BTreeSet, HashMap},
hash::Hash,
};
const TEN9PLUS7: u64 = 1000000007;
fn main() {
proconio::input! {
n: usize,
}
let mut last = (0, 1, 0);
for _ in 0..n - 1 {
let next = ((last.1 + last.2) % TEN9PLUS7, last.0, last.1);
eprintln!("{next:?}");
last = next;
}
println!("{}", (last.0 + last.1 + last.2) % TEN9PLUS7);
}