結果
| 問題 |
No.131 マンハッタン距離
|
| コンテスト | |
| ユーザー |
togaerror
|
| 提出日時 | 2015-03-18 01:32:31 |
| 言語 | Perl (5.40.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 256 bytes |
| コンパイル時間 | 105 ms |
| コンパイル使用メモリ | 6,816 KB |
| 実行使用メモリ | 12,704 KB |
| 最終ジャッジ日時 | 2024-06-28 23:10:11 |
| 合計ジャッジ時間 | 6,493 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | TLE * 1 -- * 23 |
コンパイルメッセージ
Main.pl syntax OK
ソースコード
#!/usr/bin/perl
use strict;
use warnings;
my ($x, $y, $d) = split / /, <>;
my $count = 0;
if($y < $x) {
($x, $y) = ($y, $x);
}
for(my $i = 0; $i <= $x; $i++) {
if($d <= $i + $y) {
$count++;
}
if($i == $d) {
last;
}
}
print "$count\n";
exit;
togaerror