結果

問題 No.2174 3 O'clock Easy
ユーザー Chicken-iniad
提出日時 2022-12-23 13:13:05
言語 Rust
(1.83.0 + proconio)
結果
WA  
実行時間 -
コード長 424 bytes
コンパイル時間 12,083 ms
コンパイル使用メモリ 403,796 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-21 07:40:36
合計ジャッジ時間 12,969 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other AC * 1 WA * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

use proconio::input;
// use std::cmp;
//use std::collections::VecDeque;
// use std::collections::HashSet;

fn main() {
    input! {
        n: i32,
    }
    let mut result = 0; 
    for i in 1..n+1 {
        if i % 3 == 1 {
            result += i;
        } else if i % 3 == 2 {
            result += i.pow(2);
        } else if i % 3 == 0 {
            result += i.pow(20223);
        }
    }
    println!("{}", result)
}
0