提出 #72054956


ソースコード 拡げる

#include <bits/stdc++.h>
using namespace std;
inline int read()
{
	int x=0,f=1;char ch=getchar();
	while (ch<'0'||ch>'9'){if (ch=='-') f=-1;ch=getchar();}
	while (ch>='0'&&ch<='9'){x=x*10+ch-48;ch=getchar();}
	return x*f;
}
void out(int x)
{
    if(x<0)putchar('-'),x=-x;
    if(x<10)putchar(x+'0');
    else out(x/10),putchar(x%10+'0');
}
int n,m;
int main(){
	n=read();
	m=read();
	for(;;){
		m+=7;
		if(m>n){
			cout<<m%n;
			return 0;
		}
	}
	return 0;
}

提出情報

提出日時
問題 A - First Contest of the Year
ユーザ Fireflies
言語 C++23 (GCC 15.2.0)
得点 100
コード長 485 Byte
結果 AC
実行時間 1 ms
メモリ 3632 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 100 / 100
結果
AC × 2
AC × 14
セット名 テストケース
Sample sample00.txt, sample01.txt
All sample00.txt, sample01.txt, testcase00.txt, testcase01.txt, testcase02.txt, testcase03.txt, testcase04.txt, testcase05.txt, testcase06.txt, testcase07.txt, testcase08.txt, testcase09.txt, testcase10.txt, testcase11.txt
ケース名 結果 実行時間 メモリ
sample00.txt AC 1 ms 3552 KiB
sample01.txt AC 1 ms 3576 KiB
testcase00.txt AC 1 ms 3612 KiB
testcase01.txt AC 1 ms 3388 KiB
testcase02.txt AC 1 ms 3612 KiB
testcase03.txt AC 1 ms 3632 KiB
testcase04.txt AC 1 ms 3632 KiB
testcase05.txt AC 1 ms 3336 KiB
testcase06.txt AC 1 ms 3524 KiB
testcase07.txt AC 1 ms 3564 KiB
testcase08.txt AC 1 ms 3508 KiB
testcase09.txt AC 1 ms 3556 KiB
testcase10.txt AC 1 ms 3616 KiB
testcase11.txt AC 1 ms 3524 KiB