結果
| 問題 |
No.744 循環小数N桁目 Easy
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-06-19 14:57:19 |
| 言語 | PHP (843.2) |
| 結果 |
AC
|
| 実行時間 | 40 ms / 2,000 ms |
| コード長 | 582 bytes |
| コンパイル時間 | 5,507 ms |
| コンパイル使用メモリ | 32,144 KB |
| 実行使用メモリ | 32,300 KB |
| 最終ジャッジ日時 | 2024-06-22 22:03:15 |
| 合計ジャッジ時間 | 4,641 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 7 |
コンパイルメッセージ
No syntax errors detected in Main.php
ソースコード
<?php
declare(strict_types=1);
$phrase = '428571';
$pos = UtilIO::getInt() % 6;
UtilIO::echo($phrase[$pos]);
class UtilIO {
protected static string $n = PHP_EOL;
protected function __construct() { }
public static function getString():string {
return trim(fgets(STDIN));
}
public static function getInt():int {
return intval(trim(fgets(STDIN)));
}
public static function echo(string $str):void {
echo static::toLine($str);
}
public static function toLine(string $str):string {
return trim($str).static::$n;
}
}