Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit cdac127

Browse files
solveAtcoderProblem
1 parent eb7083b commit cdac127

File tree

15 files changed

+96
-91
lines changed

15 files changed

+96
-91
lines changed

‎.idea/workspace.xml

Lines changed: 22 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Atcoder/PHP/141.ABC/A.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
$s = trim(fgets(STDIN));
3+
4+
if ($s == "Sunny") {
5+
echo "Cloudy";
6+
} else if ($s == "Cloudy") {
7+
echo "Rainy";
8+
} else {
9+
echo "Sunny";
10+
}
11+
12+
?>

‎Atcoder/PHP/141.ABC/A.phtml

Lines changed: 0 additions & 8 deletions
This file was deleted.

‎Atcoder/PHP/141.ABC/B.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php
2+
fscanf(STDIN, "%s", $s);
3+
$count = good;
4+
for ($i = 0; $i < strlen($s); $i++) {
5+
if ($i % 2 == 0 && $s[$i] == "L" || $i % 2 == 1 && $s[$i] == "R") {
6+
$count = bad;
7+
break;
8+
}
9+
}
10+
if ($count == good) {
11+
echo 'Yes';
12+
} else {
13+
echo 'No';
14+
}
15+
?>

‎Atcoder/PHP/141.ABC/B.phtml

Lines changed: 0 additions & 12 deletions
This file was deleted.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
22
fscanf(STDIN, "%d", $n);
33

4-
echo ceil($n/2)/$n;
4+
echo ceil($n / 2) / $n;
55
?>

‎Atcoder/PHP/142.ABC/B.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
fscanf(STDIN, "%d%d", $m, $n);
3+
$h = explode("", trim(fgets(STDIN)));
4+
5+
$sum = 0;
6+
for ($i = 0; $i < $m; $i++) {
7+
if ($h[$i] > $n - 1) {
8+
$sum += 1;
9+
}
10+
}
11+
echo $sum;
12+
?>

‎Atcoder/PHP/142.ABC/B.phtml

Lines changed: 0 additions & 11 deletions
This file was deleted.

‎Atcoder/PHP/143.ABC/A.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?php
2+
fscanf(STDIN, "%d%d", $a, $b);
3+
4+
if ($a - ($b + $b) > 0) {
5+
echo $a - ($b + $b);
6+
} else {
7+
echo 0;
8+
}
9+
?>

‎Atcoder/PHP/143.ABC/A.phtml

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /