結果
| 問題 | No.744 循環小数N桁目 Easy |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-06-19 14:57:19 |
| 言語 | PHP (8.5.2) |
| 結果 |
AC
|
| 実行時間 | 34 ms / 2,000 ms |
| コード長 | 582 bytes |
| 記録 | |
| コンパイル時間 | 2,932 ms |
| コンパイル使用メモリ | 37,880 KB |
| 実行使用メモリ | 38,292 KB |
| 最終ジャッジ日時 | 2026-03-07 04:26:10 |
| 合計ジャッジ時間 | 3,889 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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;
}
}