提出 #31867308


ソースコード 拡げる

use proconio::input;

fn main () {
  input! {
    n: i32,
    s: i32,
  }
  let mut count = 0;
  for i in 1..n+1 {
	for j in i..n+1 {
      if i + j <= s {
        if i == j {
	      count += 1;
        } else {
          count += 2;
        }
      }
    }
  }
  println!("{}", count);
}

提出情報

提出日時
問題 008 - Brute Force 1
ユーザ learn_machi
言語 Rust (1.42.0)
得点 1000
コード長 308 Byte
結果 AC
実行時間 6 ms
メモリ 2148 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 1000 / 1000
結果
AC × 2
AC × 22
セット名 テストケース
Sample 01_sample01.txt, 01_sample02.txt
All 01_sample01.txt, 01_sample02.txt, 02_random01.txt, 02_random02.txt, 02_random03.txt, 02_random04.txt, 02_random05.txt, 02_random06.txt, 02_random07.txt, 02_random08.txt, 02_random09.txt, 02_random10.txt, 02_random11.txt, 02_random12.txt, 02_random13.txt, 02_random14.txt, 02_random15.txt, 02_random16.txt, 02_random17.txt, 02_random18.txt, 02_random19.txt, 02_random20.txt
ケース名 結果 実行時間 メモリ
01_sample01.txt AC 6 ms 2012 KiB
01_sample02.txt AC 2 ms 2112 KiB
02_random01.txt AC 2 ms 2112 KiB
02_random02.txt AC 1 ms 2104 KiB
02_random03.txt AC 2 ms 2060 KiB
02_random04.txt AC 2 ms 2028 KiB
02_random05.txt AC 2 ms 2028 KiB
02_random06.txt AC 2 ms 2028 KiB
02_random07.txt AC 1 ms 2148 KiB
02_random08.txt AC 2 ms 1996 KiB
02_random09.txt AC 1 ms 2048 KiB
02_random10.txt AC 2 ms 2036 KiB
02_random11.txt AC 2 ms 2028 KiB
02_random12.txt AC 2 ms 2056 KiB
02_random13.txt AC 2 ms 2096 KiB
02_random14.txt AC 2 ms 2052 KiB
02_random15.txt AC 2 ms 2016 KiB
02_random16.txt AC 1 ms 2056 KiB
02_random17.txt AC 2 ms 2048 KiB
02_random18.txt AC 1 ms 2032 KiB
02_random19.txt AC 2 ms 2028 KiB
02_random20.txt AC 2 ms 2052 KiB