結果

問題 No.46 はじめのn歩
ユーザー simple-acsimple-ac
提出日時 2021-05-31 21:00:34
言語 Perl
(5.38.2)
結果
AC  
実行時間 18 ms / 5,000 ms
コード長 271 bytes
コンパイル時間 943 ms
コンパイル使用メモリ 7,680 KB
実行使用メモリ 7,808 KB
最終ジャッジ日時 2024-04-26 09:34:46
合計ジャッジ時間 1,383 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 18 ms
7,808 KB
testcase_01 AC 18 ms
7,680 KB
testcase_02 AC 18 ms
7,680 KB
testcase_03 AC 17 ms
7,680 KB
testcase_04 AC 18 ms
7,808 KB
testcase_05 AC 18 ms
7,680 KB
testcase_06 AC 18 ms
7,680 KB
testcase_07 AC 17 ms
7,808 KB
testcase_08 AC 18 ms
7,808 KB
testcase_09 AC 17 ms
7,680 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

use strict;
use warnings;
use utf8;
use POSIX;

# test a:b 40:40 40:100 20:40 40:80

my $line = <STDIN>;
chomp $line;
my ($A, $B) = split /\s/, $line;
my $answer = 0;

if($A != 0){
	$answer = floor ($B / $A);
	if(($B % $A) != 0){
		$answer += 1;
	}
}

print "$answer\n";
0